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

发布于 2024-12-10 08:25:59 字数 1467 浏览 0 评论 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 构建,单元测试项目使用设置为 v4.0 的 TargetFrameworkVersion 构建。我尝试在不同的电脑上构建它,但结果仍然相同。我也在我的项目中使用了参考资料。好像是v4.0/v3.5冲突,但我不知道如何解决。有什么想法吗?

I'm not able to build solution incrementally. I checked diagnostic log and I found that every project containing workflows are always rebuild because of this:

Input file ".NETFramework,Version=v3.5" does not exist.

Workflows are always recompiled, new temporary files are created and project is build again.

    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".

I'm building my projects using MSBuild 4.0. My projects are set to build with v3.5 TargetFrameworkVersion, unit tests projects are build with TargetFrameworkVersion set to v4.0. I tried to build it on different PC but the result is still the same. I also played with references in my projects. It seems to be like v4.0/v3.5 conflict, but I don't know how to fix it. Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青瓷清茶倾城歌 2024-12-17 08:25:59

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

我更改了 Workflow.targets 导入自

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


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

希望它能帮助别人...

I found it. The root cause is wrong version of Workflow.targets file imported inside my workflow (.csproj) projects. Workflow.targets for .NET v4.0 was imported instead of v3.5. It should be related to projects upgrade from VS2008 to VS2010 I did some time ago.

I changed Workflow.targets Import from

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

to

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

Hope it helps someone...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文