PortableLibrary Could not load file or assembly

2

I have asp.net 4 webforms website which references PortableLibrary project. In the website I serialize classes from PortableLibrary. When I deployed the project to webserver machine with IIS6 I'm getting following error:

Could not load file or assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

the portable library project references System.Xml (v4.0.31029).

When I tried to deploy clean project without references, just with simple serialization of string object, it worked fine.

A tried assemblybinding in web config but without success.

Why I'm getting this error? I have no idea from where comes the '2.0.5.0' version of system.xml.

webforms
asp.net-4.0
assembly-resolution
assemblybinding
asked on Stack Overflow May 3, 2011 by Liero

1 Answer

1

answer from here: http://visualstudiogallery.msdn.microsoft.com/b0e0b5e9-e138-410b-ad10-00cb3caf4981 which worked for me

We'll have clearer docs around this when we release, however, you need to have Update for Microsoft .NET Framework (KB2468871)[1] installed on the web server. You will also need to remove the the binding redirect - this will actually have the reverse effect of disabling the feature. :) [1] http://www.microsoft.com/downloads/en/details.aspx?FamilyID=41bdce1f-3cb3-44bb-9b33-23a1b8c99ac3&displaylang=en

answered on Stack Overflow Nov 14, 2011 by Liero

User contributions licensed under CC BY-SA 3.0