I need to add reference to 'System.XML.dll' assembly into web.config (in order to try solution for problem, mentioned here: Problem with Extension method: IXmlLineInfo).
I've tried to add the following line into "assemblies" section:
<add assembly="System.Xml, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e"/>
That caused an error:
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
To be honest, I not sure if version/Culture/PublicKeyToken are specified correctly.
I have few different versions of System.XML.dll:
Also I have some assemblies in GAC in Framework, Framework x64, etc...
Question1:
Which assembly do I need?
Question2: (obsolete)
How to determine exact assembly version and publicKeyToken?
P.S. Funny things, when I posted question I've found that there is a 'publickkeytoken' tag already and it contains answer for Question2 :)
Thanks a lot!
If you are using Visual Studio, then you can do it by Right clicking your Project-> Add Reference->Under .NET tab you will find that assembly.
How to add assembly reference via VS.
Depending on the type of project i.e WebSite or WebApplication VS will either add an entry to web.config or add the dll to your bin folder.
Now which one you need(2.0/3.5/4.0) depends on your application.