添加.resx文件时使用WPF .net Core 3.0编译错误 [英] Compile error with WPF .net Core 3.0 when adding .resx files
问题描述
以下工作正常:VS Studio 2019已通过专业人士和社区的测试.
Following works as expected: VS Studio 2019 tested with professional and community.
- 创建新的APF应用(.NET Framework)
- 打开属性文件夹
- 将Resources.resx更改为公开
- 创建一个新的资源文件(Resources.de.resx)
- 构建
按预期编译
以下操作无效:
- 创建新的APF应用(.NET Core)
- 创建资源文件夹
- 创建一个新的资源文件(Resources.resx)
- 将其更改为公开
- 创建一个新的资源文件(Resources.de.resx)
- 构建
在VS 2019 Professional和Community的3台不同机器上对其进行了测试
Tested it on 3 different machines with VS 2019 professional and community
编译错误:
错误自定义工具PublicResXFileCodeGenerator未能为输入文件'Resources \ Resources.de.resx'生成输出,但未记录特定错误.WpfApp4 C:... \ source \ repos \ WpfApp4 \ WpfApp4 \ Resources \ Resources.de.resx 1
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
错误MSB3086任务无法使用SdkToolsPath"或注册表项"HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Microsoft SDKs \ NETFXSDK \ 4.7.2 \ WinSDK-NetFx40Tools-x86"找到"al.exe".确保已设置SdkToolsPath,并且该工具存在于SdkToolsPath下正确的处理器特定位置,并且已安装Microsoft Windows SDK WpfApp4 C:\ Program Files(x86)\ Microsoft Visual Studio \ 2019 \ Professional \ MSBuild \ Current \ Bin\ Microsoft.Common.CurrentVersion.targets 3639
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上创建了一个工单
Also created a Ticket at Microsoft