无法加载文件或程序集“DotNetOpenAuth.Core" [英] Could not load file or assembly 'DotNetOpenAuth.Core
问题描述
当我启动我的 asp net mvc 4 应用程序时出现以下错误:
I get the following error when I start my asp net mvc 4 application:
Could not load file or assembly 'DotNetOpenAuth.Core, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=2780ccd10d57b246' or one of its dependencies.
The system cannot find the file specified
这是错误日志
Assembly manager loaded from: C:WindowsMicrosoft.NETFrameworkv4.0.30319clr.dll
Running under executable C:WindowsSysWOW64inetsrvw3wp.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = notebookGuilherme
LOG: DisplayName = DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246
(Fully-specified)
LOG: Appbase = file:///C:/Users/Guilherme/Documents/Visual Studio 2012/Projects/Gedi/Gedi/
LOG: Initial PrivatePath = C:UsersGuilhermeDocumentsVisual Studio 2012ProjectsGediGediin
Calling assembly : Microsoft.Web.WebPages.OAuth, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:UsersGuilhermeDocumentsVisual Studio 2012ProjectsGediGediweb.config
LOG: Using host configuration file: C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet.config
LOG: Using machine configuration file from C:WindowsMicrosoft.NETFrameworkv4.0.30319configmachine.config.
LOG: Post-policy reference: DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/2635bb56/154c3fbb/DotNetOpenAuth.Core.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/2635bb56/154c3fbb/DotNetOpenAuth.Core/DotNetOpenAuth.Core.DLL.
LOG: Attempting download of new URL file:///C:/Users/Guilherme/Documents/Visual Studio 2012/Projects/Gedi/Gedi/bin/DotNetOpenAuth.Core.DLL.
LOG: Attempting download of new URL file:///C:/Users/Guilherme/Documents/Visual Studio 2012/Projects/Gedi/Gedi/bin/DotNetOpenAuth.Core/DotNetOpenAuth.Core.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/2635bb56/154c3fbb/DotNetOpenAuth.Core.EXE.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/2635bb56/154c3fbb/DotNetOpenAuth.Core/DotNetOpenAuth.Core.EXE.
LOG: Attempting download of new URL file:///C:/Users/Guilherme/Documents/Visual Studio 2012/Projects/Gedi/Gedi/bin/DotNetOpenAuth.Core.EXE.
LOG: Attempting download of new URL file:///C:/Users/Guilherme/Documents/Visual Studio 2012/Projects/Gedi/Gedi/bin/DotNetOpenAuth.Core/DotNetOpenAuth.Core.EXE.
我已经使用打包管理器从 DotNetOpenAuth 中删除了所有引用.此外,我还通过自我引用检查了项目中的每个 Auth 程序集,但没有.
I have already remove all references from DotNetOpenAuth with packager manager. Also I checked by my self references for every Auth assembly I had in my project and there is none.
这是我的packages.config
This is my packages.config
<packages>
<package id="AutoMapper" version="2.2.0" targetFramework="net45" />
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
<package id="jQuery" version="1.7.1.1" targetFramework="net45" />
<package id="jQuery.UI.Combined" version="1.8.20.1" targetFramework="net45" />
<package id="jQuery.Validation" version="1.9.0.1" targetFramework="net45" />
<package id="knockoutjs" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages.Data" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages.WebData" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.jQuery.Unobtrusive.Ajax" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Modernizr" version="2.5.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="4.5.11" targetFramework="net45" />
<package id="Repository" version="1.0.2.12" targetFramework="net45" />
<package id="RestSharp" version="103.4" targetFramework="net45" />
<package id="WebGrease" version="1.1.0" targetFramework="net45" />
</packages>
谢谢
推荐答案
如果您不想使用 OAuth,请删除引用:WebPages OAuth DLL(我认为是 Microsoft.Web.WebPages.OAuth.dll 1) 和 DotNetOpenAuth DLL.
If you don't want use OAuth, remove references: both the WebPages OAuth DLL (I think it's Microsoft.Web.WebPages.OAuth.dll 1) and DotNetOpenAuth DLLs.
1:您可以在调用程序集
中找到文件名.因此,删除 DotNetOpenAuth.Core
的所有 调用程序集
应该对您有用.这种方法应该适用于其他未使用的缺失引用.
1: You can find the filename in Calling assembly
. So, removing all calling assembly
of DotNetOpenAuth.Core
should work for you. This approach should work for other unused missing references.
这篇关于无法加载文件或程序集“DotNetOpenAuth.Core"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!