14

I have a dev machine with

  • Windows 10 version 1909 (build 18363.1016)
  • Visual Studio Community edition 2019 version 16.7.2
  • .net plataform sdk 5.0.100-preview.5.20279.10 (and olders)

I install net plataform sdk 5.0 to run Fluid UI Desktop apps (using C#). When i create and run a blank template project, i got the error MSB3644

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 WinUIdesktop2 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 1177

On my comand line i checked the plataform SDK installed using dotnet --list-sdks

C:\Users\my_profile>dotnet --list-sdks
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.402 [C:\Program Files\dotnet\sdk]
2.1.403 [C:\Program Files\dotnet\sdk]
2.1.504 [C:\Program Files\dotnet\sdk]
2.1.602 [C:\Program Files\dotnet\sdk]
2.1.700 [C:\Program Files\dotnet\sdk]
2.1.802 [C:\Program Files\dotnet\sdk]
3.1.401 [C:\Program Files\dotnet\sdk]
5.0.100-preview.5.20279.10 [C:\Program Files\dotnet\sdk]

C:\Users\my_profile>

Any ideas on how to solve this issue?

Dariusz Woźniak
  • 9,640
  • 6
  • 60
  • 73
Pedro Polonia
  • 2,604
  • 3
  • 23
  • 31
  • 1
    I am suffering from same problem. Thank you for raising this. – Buddhika Chathuranga Aug 26 '20 at 13:06
  • Is https://stackoverflow.com/questions/49268779/the-reference-assemblies-for-framework-netcore-version-v5-0-were-not-found relevant? I know it's .NET Core, but still. – AKX Aug 26 '20 at 13:09
  • Or this one: https://stackoverflow.com/questions/61745089/msb3644-error-when-building-with-net-5-0 – Klaus Gütter Aug 26 '20 at 13:09
  • 1
    @AKX .NET 5.0 *is* the next .NET Core version – Klaus Gütter Aug 26 '20 at 13:10
  • `.net plataform sdk 5.0.100-preview.5.20279.10 (and olders)` that's a very old version. The latest one is Preview 8, released today. That version is supported by the latest Preview version of Visual Studio, 16.8 Preview 2. Update to the latest versions for both. It's quite likely you've encountered problems that were fixed in later previews – Panagiotis Kanavos Aug 26 '20 at 13:16
  • In fact, it's quite possible that the VS and SDK version don't work with each other. A *release* version of Visual Studio typically doesn't support Preview versions of the SDK – Panagiotis Kanavos Aug 26 '20 at 13:19
  • BTW Preview 8 is feature complete, which means it's a far better target than Preview 5. It's not Go-Live yet, that's for the RC version expected next month but all planned features are already included. Any changes should involve bug fixes only – Panagiotis Kanavos Aug 26 '20 at 13:21
  • @KlausGütter This question was about `.NETFramework,Version=v5.0`, not .NET Core :) – AKX Aug 26 '20 at 13:25
  • 1
    @AKX AFAIK, there is no such thing as ".NET Framework 5.0", there is ".NET 5.0" which is technically the successor of .NET Core 3.x – Klaus Gütter Aug 26 '20 at 13:42
  • 1
    you have to use [16.8 preview to use .net 5.0 previews](https://github.com/dotnet/core/blob/master/release-notes/5.0/preview/5.0.0-preview.8.md#visual-studio-compatibility) or in option select usage of preview SDK, but I have no idea if it works. – magicandre1981 Aug 26 '20 at 13:43
  • please provide your csproj as a [mcve] – Daniel A. White Aug 27 '20 at 01:18
  • @magicandre1981 has the answer, you should post it as an answer – JerMah Aug 28 '20 at 19:21
  • I am updating the windows 10 to version 2004. The stackoverflow article about the references is related to visual studio 2017 and my problem is that the templates give errors out of the box. – Pedro Polonia Aug 29 '20 at 11:48

2 Answers2

20

Microsoft states that you need a 16.8 preview version to use .net 5.0, in case of .NET 5 Preview 8 you need Visual Studio 2019 16.8 Preview 2:

.NET 5 Preview 8 requires Visual Studio 2019 16.8 Preview 2 to take full advantage of all its features. .NET 5 Preview 8 won't work properly in earlier versions of Visual Studio.

You use 16.7.2 so it is not compatible.

magicandre1981
  • 27,895
  • 5
  • 86
  • 127
-1

You must update your Visual Studio 2019 version to be able to use .Net 5. Must be at least 16.8

Tarık
  • 11