开发者

Unable to build solution incrementally: Input file ".NETFramework,Version=v3.5" does not exist

开发者 https://www.devze.com 2023-04-13 03:28 出处:网络
I\'m not able to build solution incremen开发者_运维百科tally. I checked diagnostic log and I found thatevery project containing workflows are always rebuild because of this:

I'm not able to build solution incremen开发者_运维百科tally. 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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号