Target specific version of .NET with MSBuild

后端 未结 1 1217
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-16 12:11

I have a solution that is being referenced by a MSBuild project. In the solution, I am referencing several projects that are targeting .NET 4.0. How can I tell MSBuild to ig

相关标签:
1条回答
  • 2020-12-16 12:59

    A command similar to the following should work

    msbuild YourSolution.sln /tv:3.5 /p:TargetFrameworkVersion=v3.5
    

    or

    msbuild YourSolution.sln /p:TargetFrameworkVersion=v3.5
    

    /tv (or /toolsversion) Indicates which version of the MSBuild tools you want to use, and the property TargetFrameworkVersion indicates the target framework. In your case just specifying that property should be fine, but if you want to use the 3.5 MSBuild toolset you can sepcify it with /tv as I did in the first command.

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