【问题标题】:Visual Studio Team Services build process cannot find CSharp targets fileVisual Studio Team Services 构建过程找不到 CSharp 目标文件
【发布时间】:2016-03-31 18:24:16
【问题描述】:

我正在尝试在 Visual Studio Team Services 中设置构建过程,我已按照 UWP projects 的步骤在我的盒子上使用 agent 完成此操作,但我不断收到以下构建错误:

C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v12.0\Microsoft.Windows.UI.Xaml.CSharp.targets(7,3): Error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v12.0\10.0.10240.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

我检查了构建抱怨的路径,问题出在路径中的 10.0.10240.0 中:

C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v12.0\10.0.10240.0\Microsoft.Windows.UI.Xaml.CSharp.targets

目标文件位于

C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v12.0\Microsoft.Windows.UI.Xaml.CSharp.targets

这是项目文件中的声明的样子(我不认为这是错误的,我看不出这个奇怪的 10.0.10240.0 版本在路径中的来源):

<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />

关于可能出现的问题以及如何解决问题的任何建议?

【问题讨论】:

    标签: visual-studio-2013 msbuild azure-devops azure-pipelines-build-task


    【解决方案1】:

    在 Windows 10 中引入了通用 Windows 平台。自 Visual Studio 2015 起,Visual Studio 支持 UWP 应用。您需要使用 VS2015 创建 UWP 项目,并在构建代理计算机上安装 VS2015。

    【讨论】:

    • 我从不使用 VS 2015 构建这个项目,只使用 VS 2013。我觉得奇怪的是 VS TS 需要 VS 2015。我会尽力回复您。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-05-20
    • 2013-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多