-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error MSB3971: The reference assemblies for ".NETFramework,Version=v5.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK. (MSB3971) #6256
Comments
/cc @rainersigwald - can you assist? |
What SDK version and VS for Mac version are you running? |
In addition to Maira's questions, do you have a |
This issue has been automatically closed due to no response from the original author. Please feel free to reopen it if you have more information that can help us investigate the issue further. |
I'm getting the same problem using VS2019 Preview (I'm on Windows 10). When I click on Help/Check for Updates it comes back with, “Visual Studio is up to date”. Per your response above I then went to https://dotnet.microsoft.com/download/dotnet/5.0 and chose SDK 5.0.300 for Windows x64. When finished it reported: I tried running the same command again that originally raised this error: docker build . -t
|
These parts of that output
indicates that you're using .NET Core SDK 3.1.409, rather than .NET SDK 5.0.xxx, which is required to target .NET 5.0. I tried using your Dockerfile and it seems to work fine to me--the One difference I find interesting is that the step number is 7/7 instead of 6/6 as you posted:
Is that your full, exact Dockerfile? |
I've had the same problem that @FRazban had with Visual Studio for Mac. The fix was to set the .NET Core SDK location to the non-symlinked binary. In my case, in Preferences > Projects > SDK Locations > .NET Core, I had I tried using the file browser to select Once the .NET Core SDK location was set to |
I have the same issue everytime i run dotnet build even though my sdk is set to the right location. Determining projects to restore... Build FAILED. /usr/local/share/dotnet/x64/sdk/3.1.416/Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3971: The reference assemblies for ".NETFramework,Version=v5.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK. [/Users/ademoyeoluwanifesimi/Projects/MvcMovie/MvcMovie/MvcMovie.csproj] ` |
@nifesimii Looks like you are running .NET Core SDK
How are you setting this? |
In case someone has a similar issue on the Visual Studio for Mac. After updating to MacOS Ventura all projects started throwing same errors. In my situation the next steps helped:
This one applies for dotnet 6.0 and 7.0, not sure it will help with the 5.0 version. |
I've got this same problem - it cannot find reference assemblies for .NET 6, despite the SDKs being found in visual studio. |
@brennhill Please open a new issue with more information, including logs that show the version number of the SDK as above. |
/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(3,3): Error MSB3971: The reference assemblies for ".NETFramework,Version=v5.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK. (MSB3971)
I am using visual studio for mac and my version is up to date, if I create a new project with version dotnet 5 all is well but as soon as I try to build the project I have worked on windows I get this error. I have also installed the latest version of SDK
The text was updated successfully, but these errors were encountered: