- There are xproj project A, and csproj project B. The dependency relationship is not established now.
- User add project B as a reference to A through Visual Studio UI.
- WTE add project B reference to project A's xproj file.
- WTE walk through the csproj graph and build a dg file.
- dotnet restore restores projects. Relies on the dg file generated in previous steps it manages to walk through all csproj files. It generated project.lock.json for project A. The lock file has project references to project B as well as all csproj it references. The lock file only provide the path to the csproj files.
- WTE walk down the entire msbuild project graph. For each csproj file it reachs it generates a fragment lock file.
- After all the fragment lock files are generated, these files are aggregrated into one project.fragments.lock.json file by WTE. It placed at the same place as project A's project.json.
- dotnet build looks at the lock file and realizes that it has csproj dependencies.
- dotnet build looks for the project.fragment.lock.json at the same folder as project.lock.json
- dotnet build builds.