Could not load file or assembly
‘System.Data.sqlite,Version=1.0.61.0,
Culture=neutral,
PublicKeyToken=db937bc2d44ff139’ or
one of its dependencies. An attempt
was made to load a program with an
incorrect format.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
‘System.Data.sqlite,
PublicKeyToken=db937bc2d44ff139’ or
one of its dependencies. An attempt
was made to load a program with an
incorrect format.
我的活动解决方案平台是“任何cpu”,我运行在x64 Windows 7上的x64,当然,处理器。我们使用这个版本的ELMAH的原因是因为1.0 .Net 3.5(x86,这是唯一的平台编译)给了我们在x64 Windows服务器上这个相同的错误。
我试过编译x86和x64和我得到相同的错误。我试图删除所有的编译器输出(bin和obj)。最后,我直接参考了sqlite dll,这是项目不需要在服务器上工作,我有这个编译器错误:
Error 1 Warning as Error: Assembly generation — Referenced assembly ‘System.Data.sqlite.dll’ targets a different processor MyProject
任何想法可能是什么问题?
更多错误详细信息:
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.Stack Trace:
[BadImageFormatException: Could not
load file or assembly
‘System.Data.sqlite,
PublicKeyToken=db937bc2d44ff139’ or
one of its dependencies. An attempt
was made to load a program with an
incorrect format.]
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,Boolean
forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName
assemblyRef,Boolean forIntrospection)
+127 System.Reflection.Assembly.InternalLoad(String
assemblyString,Boolean forIntrospection)
+142 System.Reflection.Assembly.Load(String
assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName,Boolean starDirective)
+46[ConfigurationErrorsException: Could
not load file or assembly
‘System.Data.sqlite,
PublicKeyToken=db937bc2d44ff139’ or
one of its dependencies. An attempt
was made to load a program with an
incorrect format.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName,Boolean starDirective)
+613 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
+203 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo
ai) +105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection
compConfig) +178
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath
configPath,Boolean
supportLocalization,String
outputAssemblyName) +54
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean
isPrecompiledApp) +232
System.Web.Compilation.BuildManager.CompileGlobalAsax()
+52 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
+337[HttpException (0x80004005): Could not
load file or assembly
‘System.Data.sqlite,
PublicKeyToken=db937bc2d44ff139’ or
one of its dependencies. An attempt
was made to load a program with an
incorrect format.]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
+58 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
+512 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
appManager,IApplicationHost appHost,
IConfigMapPathFactory
configMapPathFactory,
HostingEnvironmentParameters
hostingParameters) +729[HttpException (0x80004005): Could not
load file or assembly
‘System.Data.sqlite,
PublicKeyToken=db937bc2d44ff139’ or
one of its dependencies. An attempt
was made to load a program with an
incorrect format.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext
context) +8896783
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext
context) +85
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest
wr) +259