Skip to content

Instantly share code, notes, and snippets.

@troydai
Created March 18, 2016 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save troydai/28b13ea96560ac15058d to your computer and use it in GitHub Desktop.
Save troydai/28b13ea96560ac15058d to your computer and use it in GitHub Desktop.
xproj -> csproj proposed scenario.

xproj -> csproj

Scenario: Add csproj refernece to xproj through UI

  1. There are xproj project A, and csproj project B. The dependency relationship is not established now.
  2. User add project B as a reference to A through Visual Studio UI.
  3. WTE add project B reference to project A's xproj file.
  4. WTE walk through the csproj graph and build a dg file.
  5. 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.
  6. WTE walk down the entire msbuild project graph. For each csproj file it reachs it generates a fragment lock file.
  7. 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.

Scenario: Build

  1. dotnet build looks at the lock file and realizes that it has csproj dependencies.
  2. dotnet build looks for the project.fragment.lock.json at the same folder as project.lock.json
  3. dotnet build builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment