构建新构建定义时出现MSBuild错误
问题描述:
我们正在与VS2008连接到TFS2012。我们有一个要求,即如果有人签入更改,则最新版本文件必须复制到未与TFS映射的中央文件夹。我做了一些搜索,然后我发现如果我们可以用构建事件来做到这一点,我所要做的就是创建新的构建定义,并在签入时触发。我不能创造,所以我已创建的构建定义VS2012在VS2008构建定义,但同时与该建筑物提示错误这样构建新构建定义时出现MSBuild错误
Debug | Any CPU
1 error(s), 3 warning(s)
$/Global Module/cal_reg.sln - 1 error(s), 3 warning(s), View Log File
C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft.Common.targets (1418): Task failed because "AxImp.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "AxImp.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx35Tools-x86. You may be able to solve the problem by doing one of the following: 1) Install the Microsoft Windows SDK. 2) Install Visual Studio 2010. 3) Manually set the above registry key to the correct location. 4) Pass the correct location into the "ToolPath" parameter of the task.
C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft.Common.targets: Could not resolve this reference. Could not locate the assembly "CommonProc". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft.Common.targets: Could not resolve this reference. Could not locate the assembly "Interop.Word". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft.Common.targets: Could not resolve this reference. Could not locate the assembly "Interop.Excel". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
$/Global Module/cal_reg.sln compiled
No Test Results
No Code Coverage Results
Other Errors and Warnings
1 error(s), 0 warning(s)
Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException)
Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
我曾尝试使用MSBuild.exe但发生同样的错误在命令行中建为什么会发生这种情况?该怎么办?
答
那么,答案是在你构建日志:
C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft.Common.targets (1418): Task failed because "AxImp.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "AxImp.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx35Tools-x86.
You may be able to solve the problem by doing one of the following:
1) Install the Microsoft Windows SDK.
2) Install Visual Studio 2010.
3) Manually set the above registry key to the correct location.
4) Pass the correct location into the "ToolPath" parameter of the task.
为什么它需要VS2010的时候,我们已经有VS2012? – 2013-04-08 10:09:04
已安装Microsoft Windows SDK并将path设置为更正注册表中的位置,并在Microsoft.Common.targets文件中设置ToolPath =“$(LCToolPath)” – 2013-04-09 04:36:33