microsoft / dotnet

This repo is the official home of .NET on GitHub. It's a great starting point to find many .NET OSS projects from Microsoft and the community, including many that are part of the .NET Foundation.
https://devblogs.microsoft.com/dotnet/
MIT License
14.38k stars 2.22k forks source link

Develop .Net Framework4.0 programs using new project files(NetCore style) #1322

Closed hdefucom closed 2 years ago

hdefucom commented 3 years ago

If you use the command line to build without bin and obj files, the following errors will occur if resources are used

C:\Program Files\dotnet\sdk\5.0.201\Microsoft.Common.CurrentVersion.targets(3136,5): error MSB3823: 非字符串资源要求将属性 GenerateResourceUsePreserializedResources 设置为 true。 [E:\xxxx.csproj] C:\Program Files\dotnet\sdk\5.0.201\Microsoft.Common.CurrentVersion.targets(3136,5): error MSB3822: 非字符串资源要求在运行时使用 System.Resources.Extensions 程序集,但未在此项目的引用中找到它。 [E:\xxxx.csproj] C:\Program Files\dotnet\sdk\5.0.201\Microsoft.Common.CurrentVersion.targets(3136,5): error : ResGen.exe not supported on .NET Core MSBuild [E:\xxxx.csproj]

however, .net framework4.0 project cannot install System.Resources.Extensions because the version is not enough