无法逐步构建解决方案:输入文件“.NETFramework,Version = v3.5”不存在

时间:2011-10-16 14:14:08

标签: msbuild msbuild-4.0

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

输入文件“.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构建,单元测试项目是使用TargetFrameworkVersion设置为v4.0构建的。我尝试在不同的PC上构建它,但结果仍然相同。我也参与了我的项目中的参考。它似乎与v4.0 / v3.5冲突,但我不知道如何解决它。有什么想法吗?

1 个答案:

答案 0 :(得分:3)

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

我从

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



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

希望它有所帮助...

相关问题