I have a set of applications as a single Project developed in C# using .NET3.5. The app doesn't work in PC with NET4, I added and testing to see all functionality is working in NET4 or not. Changed the Net framework to 4.0 instead of 3.5.
The same app got compiled & build without a single error in NET4. The app contains UserSettings in Properties.Settings. I changed the version in to 4.0.0 from 2.0.0 and now app starts its execution.
My QUESTION: The code is compatible for NET3.5 & 4.0. But the only problem lies at present is value of Version in in appConfig will be different for version with .NET3.5 & .NET4.0. Is their anyway, I can use the same code for NET3.5 & 4 in addition to handle the above mentioned situation i.e. value of Version tag ? Also can I add
<startup>
<!-- FOR .NET 3.0 & 3.5, 3.0.50727 CLR is only used -->
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
<supportedRuntime version="v2.0" /> <!-- For Net 2.0, 3.0, 3.5 -->
to make the app run on PC with NET 4.0 or 3.5 ?
Any help, guidance is appreciated.
Thanks