c# - TypeLoadException -
I am using an app.config file to store credentials and when I try to retrieve them , I have a 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 & 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 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 TypeLoadException as follows:
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.
var hashtable = (hashtable) configuration manager.get synthesis ("credentials / twitter") ;
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
Post a Comment