c# - nuget - 找不到 Microsoft.Windows.UI.Xaml.CSharp.targets

标签 c# msbuild uwp nuget

我有一个 UWP 库项目,针对 Creators Update 进行了编译,我正在尝试将其发布到 nuget。

将命令 nuget package 与 nuget pack .csproj 一起使用,我收到此错误:

nuget : The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

我导航到那个目录,我只有 v14.0 和 v12.0。

我有 Windows 10 Creators Update 和最新的 Visual Studio 2017。我需要什么来安装这些构建文件?

最佳答案

试试这个

nuget pack foo.csproj -MSBuildVersion 14

关于c# - nuget - 找不到 Microsoft.Windows.UI.Xaml.CSharp.targets,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43348845/

相关文章:

c# - 在 XAML 中正确设置绑定(bind)源

c# - 如何将枚举传递给函数以及如何在 if 语句 c# 中评估枚举

msbuild - Azure DevOps - 错误 : The value for PublishProfile is set to 'FileSystem'

msbuild - 如何防止 NuGet 在还原包时询问覆盖文件?

VSTS 和 WIX 上的 MSBuildExtensionsPath

c# - 如何将依赖注入(inject)与 Facade 模式一起使用?

c# - 将Word文档转换为base64字符串C#

c# - 反射(reflect) ObjectContext 中的所有更改而不持久化到数据库

javascript - UWP JS : How to get Culture info

c# - UWP 删除 Gridview 中的焦点边框