Hager Aly
Hager Aly

Reputation: 1143

how to use DotNetOpenAuth.Core, Version=4.3.0.0 with vs 2012

i'm using visual studio (2012 or 2013) with asp mvc 4 and it gives me the following error :


Could not load file or assembly 'DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

i need to use version 4.3.0.0 i installed it using nuget

Upvotes: 0

Views: 1004

Answers (1)

dstj
dstj

Reputation: 5220

I know I had problems with the System.Mvc dependency being of the wrong version. Adding the following assembly "rebinding" to your web.config solved the problem (note the version numbers):

<configuration>
   <runtime>
      <!-- When targeting ASP.NET MVC 3-4, this assemblyBinding makes MVC 1 and 2 references relink
           to MVC 3-4 so libraries such as DotNetOpenAuth that compile against MVC 1 will work with it. -->
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <dependentAssembly>
            <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
         </dependentAssembly>
      </assemblyBinding>
   </runtime>
</configuration>

Sidenote: I discovered DotNetOpenAuth.Ultimate that bundles everything into one single DLL! It's much much simpler to maintain that the default DotNetOpenAuth and its huge number of packages....

Upvotes: 2

Related Questions