佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1177|回复: 4

Need help to fix this error

[复制链接]
发表于 5-11-2014 08:23 AM | 显示全部楼层 |阅读模式
Could not load file or assembly 'Microsoft.Build.Framework' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. 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.BadImageFormatException: Could not load file or assembly 'Microsoft.Build.Framework' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Source Error:

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 'Microsoft.Build.Framework' could not be loaded.

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:

[BadImageFormatException: Could not load file or assembly 'Microsoft.Build.Framework' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]   System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0   System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +54   System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141   System.Reflection.Assembly.Load(String assemblyString) +25   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.Build.Framework' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +596   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +211   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +46   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +177   System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +185   System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +350   System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125   System.Web.Compilation.BuildManager.CompileCodeDirectories() +445   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +448[HttpException (0x80004005): Could not load file or assembly 'Microsoft.Build.Framework' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +57   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +612   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +644[HttpException (0x80004005): Could not load file or assembly 'Microsoft.Build.Framework' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3465427   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +69   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +279


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

回复

使用道具 举报


ADVERTISEMENT

发表于 10-11-2014 09:02 PM | 显示全部楼层
可以的話, 按 '代碼" 把代碼放上來吧
回复

使用道具 举报

发表于 12-11-2014 04:01 PM | 显示全部楼层
很明显,是 M$ 的 dll 有问题。
reinstall .Net Framework 2.0 看可以解决吗。
还有,.Net Framework 2.0 很旧了。。。
回复

使用道具 举报

发表于 12-11-2014 05:11 PM | 显示全部楼层
你应该是把version 4 和version 2的一起用是吗?
回复

使用道具 举报

发表于 18-1-2015 01:48 PM | 显示全部楼层
可能是你有些 references dll 的 version 是 2.0 以上但是你 compile 的是 Framework 2.0
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 7-5-2024 10:00 AM , Processed in 0.063500 second(s), 28 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表