c# - TypeLoadException -


I am using an app.config file to store credentials and when I try to retrieve them , I have a TypeLoadException as follows:

The 'System.Configuration.DictionarySectionHandler' type could not be loaded from the assembly System.Configuration, Version = 4.0.0.0, Culture = Neutral, PublicKeyToken = b03f5f7f11d50a3a '

This is a .NET 4.5 project, I have system and System.Configuration Copy-local attributes Magistrate therefore the true , and I do not understand what comes from where the problem is I have no experience in the NAT programming, so not very easily with the concept of assembly.

& Lt; ConfigSections & gt; & Lt; Section group name = "credentials" & gt; & Lt; Section name = "Twitter" type = "System.Configuration.DictionarySectionHandler" /> & Lt; / SectionGroup & gt; & Lt; / ConfigSections & gt; & Lt; Credit & gt; & Lt; Twitter & gt; & Lt; Add key = "****" value = "*****" /> & Lt; Add key = "****" value = "*****" /> & Lt; / Twitter & gt; & Lt; / Credibility & gt;

Connecting service file

  var hashtable = (hashtable) configuration manager.get synthesis ("credentials / twitter") ;   

I know that this is a common issue, and I googled it before posting it. But the solution I have found so far does not seem to work, or I have not understood them correctly.

Thank you in advance.

You can enter fully qualified class name with app Need to use .config Hans said. Your code will contain

  & lt; SectionGroup name = "credentials" & gt; & Lt; Section name = "Twitter" type = "System.Configuration.DictionarySectionHandler, system, version = 4.0.0.0, culture = neutral, public keynote = b77a5c561934e089" /> & Lt; / SectionGroup & gt;    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -