Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Config error refers to Version 4.0.0.0 after re-targeting to 2.0.0.0 even after changing all references in config files

$
0
0

I had a project targeting .NET Framework 4 which for a variety of reasons I had to downgrade to target .NET 3.5.  This produced a rash of System.Configuration.ConfigurationErrorsExceptions whenever the code tried to access My.Settings.  The error message was "An error occurred creating the configuration section handler for userSettings/ACal4.My.MySettings: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. I searched the solution for every instance of  'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' and changed it to 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' but the error persisted.  I looked in the project file but found nothing relevant there.

I tried recreating the project from scratch in NET 2 and upgraded to NET 3.5 and I still got the same error even though the new project had never referenced 4.0!  Could there be some kind of cache that I am missing?

I am using VS2013.


Mike VE


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>