7

我使用teamcity構建使用64位MSBuild的Sharepoint項目。所有項目都能正常工作,而不是我的工作流項當使用框架4.0我得到錯誤信息無法使用msbuild構建工作流項目(Sharepoint 2010)

c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Workflow.Targets(121,5): error MSB4018: The "CompileWorkflowTask" task failed unexpectedly. [V:\Workflows\MyCustomer.WFs.TranslationWorkflow\MyCustomer.WFs.TranslationWorkflow\MyCustomer.WFs.TranslationWorkflow.csproj] c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Workflow.Targets(121,5): error MSB4018: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Windows\system32\config\systemprofile\AppData\Local\Temp\vjwduioy.tmp'. [V:\Workflows\MyCustomer.WFs.TranslationWorkflow\MyCustomer.WFs.TranslationWorkflow\MyCustomer.WFs.TranslationWorkflow.csproj]

我記得微軟擺脫了舊的工作流機制,所以我預計它可能只與舊的3.5框架的工作,並建立與該項目卻得到了另一個錯誤:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets(37,45): error MSB4019: The imported project "C:\Windows\Microsoft.NET\Framework64\v3.5\Workflow.Targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

在Visual Studio 2010中,建築工程就好了。

回答

6

找到了解決辦法: 我在創建文件夾 'C:\ WINDOWS \ system32 \設置\ systemprofile \應用程序數據\本地的\ Temp \'

這似乎是一個完整的TeamCity發出

+1

創建什麼文件夾?用什麼名字?它裏面有什麼? – Shaggydog 2013-08-21 14:38:45

+0

對不起。太久以前。我不記得了。 (不知何故覺得自己像個政治家,現在:)) – 2013-08-22 07:46:18

+1

與TeamCity有同樣的問題,要更準確地描述'Temp'必須出現在'C:\ Windows \ system32 \ config \ systemprofile \ AppData \ Local'文件夾中 – 2014-08-19 11:34:26

0

通過修改CMD環境解決。

加入C:\Windows\system32\config\systemprofile\AppData\Local\Temp\並沒有幫助我。

C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Temp‌。 更有甚者,在\ Syswow64資料...添加\ Temp文件夾後,我被迫使用64位的MSBuild因爲new weird bugVBCSCompiler.exe造成CSC:錯誤CS2001:源文件......找不到

另外我不能一直使用MSBuild x64。
我無法通過DevEnv.com使用MSBuild x64來構建Visual Studio安裝項目。 DevEnv只允許使用x32 MSBuild。

希望我找到了一個有趣的方式來解決所有這些錯誤。
我已經通過覆蓋CMD的環境變量(如AppData等)更改了CMD調用的配置文件文件夾。

這裏是它的滿滿的,工作版本 - MSBuild-File-System-Redirector-fail-System32-to-SysWOW64

很遺憾,但你不能沒有Wrapping a call of MSBuild and DevEnv by a batch file使用它。或從這answer相同。

相關問題