第一次使用c#在Visual Studio 2012上使用MVC 4 EF 5。我刚刚在另一台计算机上打开了这个项目。
我收到以下错误消息,请帮忙,因为我有点超出我的深度。
Server Error in '/' Application.
Could not load file or assembly 'ThumbBusters[Conflict]' or one of its dependencies.
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request.
Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'ThumbBusters[Conflict]' or one of its dependencies.
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
来源错误:
An unhandled exception was generated during the execution of the current web request.
Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'ThumbBusters[Conflict]' could not be loaded.
=== Pre-bind state information ===
LOG: User = MBRONET\m1105825
LOG: DisplayName = ThumbBusters[Conflict]
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: ThumbBusters[Conflict] | Domain ID: 3
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///I:/Desktop/ThumbBusters/ThumbBusters/
LOG: Initial PrivatePath = I:\Desktop\ThumbBusters\ThumbBusters\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: I:\Desktop\ThumbBusters\ThumbBusters\web.config
LOG: Using host configuration file: I:\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/m1105825/AppData/Local/Temp/Temporary ASP.NET Files/root/cdf649a7/f0e924b3/ThumbBusters[Conflict].DLL.
LOG: Attempting download of new URL file:///C:/Users/m1105825/AppData/Local/Temp/Temporary ASP.NET Files/root/cdf649a7/f0e924b3/ThumbBusters[Conflict]/ThumbBusters[Conflict].DLL.
LOG: Attempting download of new URL file:///I:/Desktop/ThumbBusters/ThumbBusters/bin/ThumbBusters[Conflict].DLL.
WRN: Comparing the assembly name resulted in the mismatch: NAME
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
堆栈追踪:
[FileLoadException: Could not load file or assembly 'ThumbBusters[Conflict]' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +34
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +77
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +16
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +38
[ConfigurationErrorsException: Could not load file or assembly 'ThumbBusters[Conflict]' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +752
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +218
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +170
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +91
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath) +258
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): Could not load file or assembly 'ThumbBusters[Conflict]' 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) +9873912
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET版本:4.0.30319.17929
答案 0 :(得分:2)
无法加载文件或程序集&ThumbBusters [Conflict]'或其中一个依赖项。 找到的程序集的清单定义与程序集引用
不匹配
在另一台计算机上,您有一个ThumbBusters
DLL,它与您之前计算机上的DLL不同。因此,您的项目无法加载它。
您应该检查并确保使用正确版本的DLL。
答案 1 :(得分:1)
您的问题是:"我刚刚在另一台计算机上打开了该项目。"
用于在另一台计算机上加载项目的任何内容都不得将ThumbBusters
DLL包含在项目中,或者安装在计算机上。这是你必须要研究的东西。如果它是来自nuGet的东西,那很容易解决。
答案 2 :(得分:0)
我进入了bin文件夹并删除了冲突文件,这解决了这个问题。