未能加载文件或程序集“export_net_dsb”或它的某一个依赖项。试图加载格式不正确的程序堆栈跟踪: 
[BadImageFormatException: 未能加载文件或程序集“export_net_dsb”或它的某一个依赖项。试图加载格式不正确的程序。]
   System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
   System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +416
   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +166
   System.Reflection.Assembly.Load(String assemblyString) +35
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +190[ConfigurationErrorsException: 未能加载文件或程序集“export_net_dsb”或它的某一个依赖项。试图加载格式不正确的程序。]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +11207304
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +388
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +232
   System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +48
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +210
   System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +76
   System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +283
   System.Web.Compilation.BuildManager.CompileGlobalAsax() +50
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +676[HttpException (0x80004005): 未能加载文件或程序集“export_net_dsb”或它的某一个依赖项。试图加载格式不正确的程序。]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +76
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +1012
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +1025[HttpException (0x80004005): 未能加载文件或程序集“export_net_dsb”或它的某一个依赖项。试图加载格式不正确的程序。]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11301302
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4338644
 

解决方案 »

  1.   

    未能加载文件或程序集export_net_dsbexport_net_dsb是用C++/Cli写的托管代码
      

  2.   

    已经被包装成托管代码了,可以像引用C#的DLL一样引用调用
      

  3.   

    右击解决方案->属性->通用属性->调试源文件->删掉不查找源文件里的内容
      

  4.   

    这个里面是空的不好意思,忘了说个情况。在我本机是可以的(我本机是Win2003系统)部署到服务器上就报这个错误(win2008)
      

  5.   

    用文本工具打开 .sln 文件看看里面的路径是否正确 不对的话改正过来就好了