Can a build server with .NET 4.5 installed successfully deploy a project targeting 4.0 to a server with only .NET 4.0 installed?

前端 未结 1 1762
余生分开走
余生分开走 2021-01-02 08:16

We\'ve recently installed .NET 4.5 onto our continuous integration build server so that it can support new projects that utilize features of .NET 4.5. This build server is a

相关标签:
1条回答
  • 2021-01-02 08:34

    This occurs because 4.5 is an in-place upgrade to 4.0. When the build server compiles, by default, it will find the 4.5 assemblies even if you're targeting .NET 4.

    You can correct this, but you need to add the 4.0 reference assemblies to your build server (so the compiler finds them), and not just rely on the .NET 4.5 versions.

    For details, see Marc Gravell's blog post on the subject.

    0 讨论(0)
提交回复
热议问题