I have a set of tools that need to be deployed on NET 3.5 or NET 4.0 depending on an MsBuild condition. At the moment we would like to change the project file of those utilities to handle this. We are aware that we can do something like this:
<TargetFrameworkVersion Condition="">v3.5</TargetFrameworkVersion>
What is not clear for us is how can we specify different versions of NET depending on the condition. The condition property is an int that returns a number, between 1 and 4 and depending on that value we should target a different NET framework and of course change also this property in the app.config
<startup>
<supportedRuntime version="v2.0.50727"/>
</startup>
I want to know what is the right way of handling this type of problem.