The reference assemblies for framework “.NETFramework,Version=v4.6.2” were not found

后端 未结 7 1469
情深已故
情深已故 2020-12-13 17:03

When trying to compile a solution, I get the following build error:

Error MSB3644 The reference assemblies for framework \".NETFramework,Version=v4.

7条回答
  •  心在旅途
    2020-12-13 17:26

    Starting May, 2019 you can build your project on net20 up to net48 (including ne461) any machine with at least MSBuild or the .NET Core SDK installed without the need of Developer Pack installed.

    If .NET Core SDK installed in you machine, Add the nuget package Microsoft.NETFramework.ReferenceAssemblies to your project

        
            
                runtime; build; native; contentfiles; analyzers
                all
                 
        
    

    The package include all ReferenceAssemblies starting net20 up to net48

    These packages enable building .NET Framework projects on any machine with at least MSBuild or the .NET Core SDK installed plus other scenarios.

    For more details: https://github.com/Microsoft/dotnet/tree/master/releases/reference-assemblies

提交回复
热议问题