Skip to content
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

Reference to .NET 5.0 fails #41

Open
tahalukmanji opened this issue Aug 20, 2020 · 1 comment
Open

Reference to .NET 5.0 fails #41

tahalukmanji opened this issue Aug 20, 2020 · 1 comment

Comments

@tahalukmanji
Copy link

I downloaded the latest .NET 5 SDK preview 7. Yet, I cannot build netling project as I get error like:

Severity Code Description Project File Line Suppression State
Error MSB3644 The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks Netling.Core C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 1177
Error Project '..\Netling.Core\Netling.Core.csproj' targets 'net5.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v5.0'. Netling.Core.HttpClientWorker C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 1655
Error Project '..\Netling.Core.SocketWorker\Netling.Core.SocketWorker.csproj' targets 'net5.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v5.0'. Netling.Benchmarks C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 1655
Error Project '..\Netling.Core\Netling.Core.csproj' targets 'net5.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v5.0'. Netling.Benchmarks C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 1655
Error Project '..\Netling.Core.HttpClientWorker\Netling.Core.HttpClientWorker.csproj' targets 'net5.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v5.0'. Netling.Client C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 1655
Error Project '..\Netling.Core.SocketWorker\Netling.Core.SocketWorker.csproj' targets 'net5.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v5.0'. Netling.Client C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 1655
Error Project '..\Netling.Core\Netling.Core.csproj' targets 'net5.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v5.0'. Netling.Client C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 1655
Error Project '..\Netling.Core.HttpClientWorker\Netling.Core.HttpClientWorker.csproj' targets 'net5.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v5.0'. Netling.ConsoleClient C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 1655
Error Project '..\Netling.Core.SocketWorker\Netling.Core.SocketWorker.csproj' targets 'net5.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v5.0'. Netling.ConsoleClient C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 1655
Error Project '..\Netling.Core\Netling.Core.csproj' targets 'net5.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v5.0'. Netling.ConsoleClient C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 1655
Error MSB3644 The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks Netling.Tests C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 1177
Error MSB3644 The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks Netling.Benchmarks C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 1177

Please advise what to do next.

@simon-flanagan
Copy link

I just have fixed something similar on my system- it might be a bit late for the original question but might help someone:

In my case it was that I had assumed that the latest version of the .net 5 SDK and the latest version of Visual Studio would be compatible. This is not the case - I think particularly because the SDK is still in preview you need a preview version of VS to be able to run it. At the time of writing the latest main-line version of VS is 16.7.3 and the version of the .net 5 SDK that is compatible is .NET 5.0 SDK (v5.0.100-preview.7).

In my investigations it also seems like installing the correct processor version (x86 vs x64) is also a common cause of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants