I was originally writing my program for .NET 4.0... however, recently I changed the target framework for .NET 3.5... the program still works fine, but now I'm running into a rather odd error. In the past, when I built the program, it would generate the .exe and that is it. Now it generates a .exe and a .exe.config.
Should still be fine right? Nope, in the .exe.config file, it has the following code:
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
...
</sectionGroup>
</configSections>
As you can see, it says Version=4.0.0.0
and because of this, when I run the program I get an unhandled exception assembly error. Its pretty easy to fix, I just delete the .exe.config file and all is well. But its starting to become a pain, to do this on each and every build.
What can I do to fix this?