0

My visual studio pro 2019 is v16.11.2. I can build my mvc project without any issue by pressing build button, and run this project very well. Of cause, I've installed .net sdk 5.0.400 on my win10

enter image description here

Currently I'm studying docker, so I need to run command to build my project.

dotnet build "MVConDocker.csproj" -c Release -o /app/build

unfortunately it failed.

error MSB3971: The reference assemblies for ".NETFramework,Version=v5.0" were not found.

enter image description here

In global.json file, it's 5.0.400.

5
  • 2
    Somehow you managed to target .NET Framework 5.0, which doesn't exist. The latest version of framework is 4.8. I think you meant to target .NET 5.0 Commented Sep 10, 2021 at 15:02
  • Do you have a reference that is not compatible with .NET 5.0? Commented Sep 10, 2021 at 15:07
  • Please use text for text, not images. See How to Ask for more tips on asking good questions for Stack Overflow. Commented Sep 10, 2021 at 15:17
  • See learn.microsoft.com/en-us/dotnet/standard/… for the correct values to put in the CSPROJ file (although VS2019 should be setting that for you). Commented Sep 10, 2021 at 15:19
  • Can you edit the question to include the project file? Commented Sep 10, 2021 at 17:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.