It is a bit complicated to build the binaries and use the locally because the shared framework makes it all very compiled.
Anyway, here goes:
-
Check out the AspNetCore repository recursively (so that the sub modules are checked out as well).
-
Apply the diff from this gist.
-
Run the build:
.\build.cmd /t:BuildSharedFx /p:SkipTests=true /p:DisableCodeSigning=true /p:DisableSignCheck=true -
Now it gets messy. You'il have a
build/artifacts/installerfolder with a zip file. Expand this zip file in%PROGRAMFILES%\dotnet\shared\Microsoft.AspNetCore.App\<version of your framework build>. These are not the good binaries however because there are nowhere the correct symbol files to be found. For the packages you wish to debug, you need to extract the dll and symbol files from the*.symbols.nupkgfiles and overwrite them in the shared framework folder path. -
Finally, modify your project file. Add
<NoWarn>NU1603;NU1605;NU5125;$(NoWarn)</NoWarn>and use aPackageReferencewith a version number equal to the<version of your framework build>. Delete theobjfolder and run adotnet restore.
If I correctly understand full pipeline of build target
BuildSharedFxit not buildMicrosoft.AspNetCore.Appfrom source it just download all dependencies from nuget storage.If it is correctly, can we build shared framework from sources in this repo?