1

我无法逐步构建解决方案。我检查了诊断日志,发现每个包含工作流的项目总是因为这个而重建:

输入文件“.NETFramework,Version=v3.5”不存在。

总是重新编译工作流程,创建新的临时文件并再次构建项目。

    Building target "WorkflowCompilation" completely.
    Input file ".NETFramework,Version=v3.5" does not exist.
    Using "CompileWorkflowTask" task from assembly "System.Workflow.ComponentModel,        Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
    Task "CompileWorkflowTask"
      No files found with '.xoml' extension in the set of input files.
      Generated temporary code file: C:\Users\Ludwo\AppData\Local\Temp\uwdnm5th.cs
      Workflow markup validations completed with 0 errors and 0 warnings.
    Done executing task "CompileWorkflowTask".
    Done building target "WorkflowCompilation" in project "Delta.Workflow.Common.Merged.csproj".
    Target "CoreCompile" in file "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.CSharp.targets" from project "h:\Prj\R4x\M\CountrySystems\Delta\Common\Delta.Workflow.Common\Delta.Workflow.Common.Merged.csproj" (target "Compile" depends on it):
    Building target "CoreCompile" completely.
    Input file "C:\Users\Ludwo\AppData\Local\Temp\uwdnm5th.cs" is newer than output file "obj\Debug\Delta.Workflow.Common.pdb".

我正在使用 MSBuild 4.0 构建我的项目。我的项目设置为使用 v3.5 TargetFrameworkVersion 构建,单元测试项目使用设置为 v4.0 的 TargetFrameworkVersion 构建。我尝试在不同的 PC 上构建它,但结果仍然相同。我还在我的项目中使用了参考资料。好像是v4.0/v3.5冲突,但是不知道怎么解决。有任何想法吗?

4

1 回答 1

3

我找到了。根本原因是在我的工作流 (.csproj) 项目中导入的 Workflow.targets 文件版本错误。.NET v4.0 的 Workflow.targets 被导入而不是 v3.5。它应该与我前段时间从VS2008升级到VS2010的项目有关。

我改变了 Workflow.targets Import from

<Import Project="$(MSBuildToolsPath)\Workflow.targets"/>



<Import Project="$(MSBuildExtensionsPath)\Microsoft\Windows Workflow Foundation\v3.5\Workflow.targets" />

希望它可以帮助某人...

于 2011-10-17T13:11:30.340 回答