2013-04-08 83 views
1

我們正在與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但發生同樣的錯誤在命令行中建爲什麼會發生這種情況?該怎麼辦?

回答

1

那麼,答案是在你構建日誌:

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. 
+0

爲什麼它需要VS2010的時候,我們已經有VS2012? – 2013-04-08 10:09:04

+0

已安裝Microsoft Windows SDK並將path設置爲更正註冊表中的位置,並在Microsoft.Common.targets文件中設置ToolPath =「$(LCToolPath)」 – 2013-04-09 04:36:33