我目前正在构建一个ASP.NET 4应用程序。 我有一个名为CommupointServiceLibrary的DLL。每次我尝试运行Web应用程序时,都会收到以下错误消息。 无法加载文件或程序集''CommupointServicesLibrary,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = e3a9262f077d766f''或其依赖项之一。定位的程序集的清单定义与程序集引用不匹配。 (HRESULT异常:0x80131040)。 dll是.NET 3.5 我在做什么错误?
I am currently building a ASP.NET 4 application. I have a DLL called CommupointServiceLibrary. Each time that I try to run the web application I get the following error message. Could not load file or assembly ''CommupointServicesLibrary, Version=4.0.0.0, Culture=neutral, PublicKeyToken=e3a9262f077d766f'' or one of its dependencies. The located assembly''s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040). The dll is .NET 3.5 What I am doing wrong?
推荐答案服务器使用.Net版本4,因此尝试加载为.Net 4构建的dll。 在Windows应用程序中,您将在< configuration>< / configuration> 部分添加到app.config: The server uses .Net version 4 and thus tries to load dlls built for .Net 4. In Windows applications, you''d add to app.config in the <configuration></configuration> section: <startup useLegacyV2RuntimeActivationPolicy="true"> </startup>
Web应用程序应该有类似内容。
There should be something similar for web applications.
更多推荐
System.IO.FileLoadException运行Web应用程序时
发布评论