I've noticed in Visual C# 2010, whenever you change the target framework version away from the default 4.0 client profile (and even if you change it back afterwards), the IDE creates a. config file that it clearly thinks ought to be shipped with the program. The .config file basically just says what the supported/target framework version is.
Now, as far as I've been able to tell from a Google search, if that file is not present, the fallback is to try to run the program against the framework version it was built against.
Since that is presumably the same as the version the .config file says, doesn't that mean the .config file has no effect and can be omitted? Or am I missing something?
If the version you compiled with is the same as the version you want to run in then yes it is not required to keep this config file. But say you compiled for .Net 2.0 and want to force your assembly to run in the .Net 4.0 runtime. You could use this setting to affect your application. You could also use this to force your application to use different versions of the runtime if they cause known issues with your application. (I haven't seen any problems like this yet so I can only speculate.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With