dotnet / dotnet/aspnetcore

How to get VS to use local build of ASP.NET Core?

Open
#27,291 11 comments 3 reactions 0 assignees View on GitHub
affected-few area-infrastructure severity-nice-to-have task
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

I've followed all the steps in `BuildFromSource.md` to get a local build of `release/3.1` built and installed. I'm using the `startvs.cmd` in the root of the repo to run my own VS solution. When I build and run my sln and check the Debug > Modules, I can see it's indeed using my locally-built 3.1.10 DLLs. All good.

However, if I check the project's referenced frameworks (Project > Dependencies > Frameworks) I see the following:

* Microsoft.AspNetCore.App: path C:\Users\iank\.nuget\packages\microsoft.aspnetcore.app.ref\3.1.8, version 3.1.8
* Microsoft.NETCore.App: path C:\aspnetcore\.dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0, version 3.1.0

I would *expect* that `Microsoft.AspNetCore.App` would be using `C:\aspnetcore\.dotnet\packs\Microsoft.AspNetCore.App.Ref\3.1.10`, but that isn't the case. The end result is that instead of building against my local 3.1.10, VS is building against the release 3.1.8, which is not what I want.

**How do I make VS build using the 3.1.10 ASP.NET Core DLLs?** Do I have to define a new/unique `FrameworkReference` that points to my 3.1.10 DLLs?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.