Visual Studio Team Services 构建过程找不到 CSharp 目标文件

Visual Studio Team Services build process cannot find CSharp targets file

我正在尝试在 Visual Studio Team Services 中设置一个构建过程,我已经按照 UWP projects using an 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.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.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" />

关于可能出现的错误以及我该如何解决的任何建议?

通用 Windows 平台在 Windows 10 中引入。Visual Studio 从 Visual Studio 2015 开始支持 UWP 应用程序。您需要使用 VS2015 创建一个UWP 项目,并在您的构建代理计算机上安装 VS2015。