Hi DevExpress Team,
I have created a sample web MVC project
according to your wizard. But it seems that it cannot work out. The VS
is always telling me:<italic>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 have deleted the bin and obj folder, rebuilt the project like a thousand times, but the error is the same. So could you please help me with this? Please find the sample project in the attachment.
</italic>Here is the stack trace:
C#[FileLoadException: 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)]
Microsoft.Web.WebPages.OAuth.PreApplicationStartCode.Start() +0
[InvalidOperationException: The pre-application start initialization method Start on type Microsoft.Web.WebPages.OAuth.PreApplicationStartCode threw an exception with the following error message: 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).]
System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +550
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +132
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath) +90
System.Web.Compilation.BuildManager.ExecutePreAppStart() +135
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +516
[HttpException (0x80004005): The pre-application start initialization method Start on type Microsoft.Web.WebPages.OAuth.PreApplicationStartCode threw an exception with the following error message: 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).]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9874840
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
Hi Spencer,
I've created a sample MVC project by using our Project Wizard, however, I did not reproduce this behavior. Please check the attached screencast.
Would you please clarify - did you change any settings or something else in the wizard or after creating this project?
If so, can you provide me with this information?
Hi Helen,
Thanks for your reply. I think I do not recall any changes to the settings or something else. I used the windows logging tool, it shows that the vs is looking for something older. In my reference, the DotNetOpenAuth is of version 4.1.XXX, not 4.0.0.0. I do not know why it is looking for this old version. In the root web.config, I have added the following code, but the result is the same…
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.AspNet"
publicKeyToken="2780ccd10d57b246"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.Core"
publicKeyToken="2780ccd10d57b246"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
</dependentAssembly>
I have also tried to use NuGet uninstall the DotNetOpenAuth and reinstall it, still does not work out. I just do not know why the vs is looking for this old version. Do you have any idea how this works?
In the end, in order to make it running, I have to deleted all the code and reference refers to the DotNetOpenAuth…Then it works fine.
BTW, can you open my sample project correctly?
Here is the Log in the attachment.
Hello Spencer,
The cause of this problem is described in the context of the DotNetOpenAuth.Asp Couldnt Load Assembly or one of its dependencies and The located assembly's manifest definition does not match the assembly reference articles.
I believe that the best solution is to place necessary assemblies in GAC and change assembly references manually to avoid these problems. I haven't managed to run your project since I don't have the required versions on my computer. However, if I create a new project, correct versions are specified in the pakages.config file on my side. Would you please make a screencast that demonstrates how you create this project (for example, using the Jing Tool)?
Hello Artem,
I'm facing the same issue of Spencer. You could find the video describing this problem in attachement.
Regards
Sylvain