Build error while transitioning between branches: Your project is not referencing the “.NETFramework,Version=v4.7.2” framework

前端 未结 8 1222
暗喜
暗喜 2021-02-01 12:40

We\'re using Git and we have a solution which is targeting the full net framework. A couple of days ago, I\'ve started migrating the solution to .net core. Unfortunately, someth

8条回答
  •  梦谈多话
    2021-02-01 13:19

    I had same error and bin/obj cleanup did not help. After a lengthy investigation I have found that I have mistakenly overridden IntermediateOutputPath to point to the same directory for all my projects. This messed up NuGet intermediate files during parallel build. Fixing Build.Directory.props to include $(MSBuildProjectName) in IntermediateOutputPath resolved the issue for me.

提交回复
热议问题