以下工作按预期进行: VS Studio 2019 经过专业人士和社区的测试。
- 创建新的 APF 应用(.NET Framework)
- 打开属性文件夹
- 将 Resources.resx 更改为公开
- 创建新的资源文件 (Resources.de.resx)
- 构建
按预期编译
以下不起作用:
- 创建新的 APF 应用 (.NET Core)
- 创建资源文件夹
- 创建新的资源文件 (Resources.resx)
- 将其更改为公开
- 创建新的资源文件 (Resources.de.resx)
- 构建
使用 VS 2019 专业版和社区在 3 台不同的机器上进行了测试
编译错误:
Error Custom tool PublicResXFileCodeGenerator failed to produce an output for input file 'Resources\Resources.de.resx' but did not log a specific error. WpfApp4 C:...\source\repos\WpfApp4\WpfApp4\Resources\Resources.de.resx 1
Error MSB3086 Task could not find "al.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\NETFXSDK\4.7.2\WinSDK-NetFx40Tools-x86". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed WpfApp4 C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 3639
编辑:还在 Microsoft 创建了一个票证
最佳答案
尝试安装.NET Framework 4.7.2 Developer Pack 。仅在编译时需要它。
关于c# - 添加 .resx 文件时 WPF .net Core 3.0 编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58298390/