我一直在寻找,但我得到的是像
The imported project "C:...\Microsoft.Cpp.Default.props" was not found,
instead of
"C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Microsoft.VisualStudio..Default.props" was not found.". See the diff, the former is "Microsoft.Cpp.Default.props" while my error is Microsoft.VisualStudio..Default.props. Here's the full error log:
Path To MSBuild.exe: C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild
Executing the command cmd.exe /C " "C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild" /t:Build,Publish /p:Configuration=Release /p:platform=x86 "platforms\windows\CordovaApp.Windows.jsproj" " && exit %%ERRORLEVEL%% from E:\Jenkins\workspace\Mobile Field Service (Windows)
[Mobile Field Service (Windows)] $ cmd.exe /C " "C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild" /t:Build,Publish /p:Configuration=Release /p:platform=x86 "platforms\windows\CordovaApp.Windows.jsproj" " && exit %%ERRORLEVEL%%
Microsoft (R) Build Engine version 12.0.30501.0
[Microsoft .NET Framework, version 4.0.30319.34014]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 11/26/2015 4:27:09 AM.
Project "E:\Jenkins\workspace\Mobile Field Service (Windows)\platforms\windows\CordovaApp.Windows.jsproj" on node 1 (Build;Publish target(s)).
E:\Jenkins\workspace\Mobile Field Service (Windows)\platforms\windows\CordovaApp.Windows.jsproj(52,5): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Microsoft.VisualStudio..Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Done Building Project "E:\Jenkins\workspace\Mobile Field Service (Windows)\platforms\windows\CordovaApp.Windows.jsproj" (Build;Publish target(s)) -- FAILED.
Build FAILED.
"E:\Jenkins\workspace\Mobile Field Service (Windows)\platforms\windows\CordovaApp.Windows.jsproj" (Build;Publish target) (1) ->
E:\Jenkins\workspace\Mobile Field Service (Windows)\platforms\windows\CordovaApp.Windows.jsproj(52,5): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Microsoft.VisualStudio..Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.79
Build step 'Build a Visual Studio project or solution using MSBuild' marked build as failure
Archiving artifacts
Finished: FAILURE
顺便说一句,我的操作系统是Windows 2012 R2吗?
答案 0 :(得分:0)
检查jenkins服务器的以下位置是否有Microsoft.TypeScript.Default.props
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript
如果没有 尝试从本地计算机复制它(如果它在本地计算机上可用,并且jenkins在单独的服务器中可用)并创建所需的文件夹结构
OR
在项目文件中添加此条件导入语句
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props"
Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props')" />
答案 1 :(得分:0)
我收到了MSB4019错误,因为我没有对C的写权限。
在我的情况下,执行具有管理员权限的命令有帮助,但是对于Windows用户帐户更改C的读/写权限也应该有效。
this thread中列出了其他选项。