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相同。

相关问题