添加.resx文件时使用WPF .net Core 3.0编译错误 [英] Compile error with WPF .net Core 3.0 when adding .resx files

查看:92
本文介绍了添加.resx文件时使用WPF .net Core 3.0编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下工作正常: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

推荐答案

尝试安装

Try to install .NET Framework 4.7.2 Developer Pack. It is needed only for compilation.

这篇关于添加.resx文件时使用WPF .net Core 3.0编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆