C# 및 system.data.sqlite.dll x64를 사용하여 작성된 WCF 서비스 라이브러리가 있습니다. 빌드 구성은 모든 CPU입니다. 그것은 잘 작동합니다. 하지만 system.data.sqlite.dll을 x86 비트 버전으로 변경하면 모든 CPU 구성에서 성공적으로 빌드되지만 wcf를 실행하면 오류가 발생합니다. x86 빌드 구성에서는 성공적으로 빌드되지만 디버깅 할 때 다음 오류가 발생합니다. wcftestclient를 사용합니다.System.Data.Sqlite.dll 32 비트 64 비트 C#
System.BadImageFormatException: Could not load file or assembly 'file:///C:\Users\lala\Desktop\New folder\New folder\CoreServiceWCF\CoreServiceWCF\CoreServiceWCF2\bin\x86\Debug\VplusCoreServiceWCF.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 'file:///C:\Users\lala\Desktop\New folder\New folder\CoreServiceWCF\CoreServiceWCF\CoreServiceWCF2\bin\x86\Debug\VplusCoreServiceWCF.dll'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at Microsoft.Tools.SvcHost.ServiceHostHelper.LoadServiceAssembly(String svcAssemblyPath)
=== Pre-bind state information ===
LOG: User = lala-PC\lala
LOG: Where-ref bind. Location = C:\Users\lala\Desktop\New folder\New folder\CoreServiceWCF\CoreServiceWCF\CoreServiceWCF2\bin\x86\Debug\VplusCoreServiceWCF.dll
LOG: Appbase = file:///C:/Users/lala/Desktop/New folder/New folder/CoreServiceWCF/CoreServiceWCF/CoreServiceWCF2/bin/x86/Debug
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: Using application configuration file: C:\Users\lala\Desktop\New folder\New folder\CoreServiceWCF\CoreServiceWCF\CoreServiceWCF2\bin\x86\Debug\VplusCoreServiceWCF.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Attempting download of new URL file:///C:/Users/lala/Desktop/New folder/New folder/CoreServiceWCF/CoreServiceWCF/CoreServiceWCF2/bin/x86/Debug/VplusCoreServiceWCF.dll.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
누구든지이 문제를 해결할 수 있도록 도움을 주시겠습니까?
32 및 64 비트 실행 파일 s는 호환되지 않습니다. 32 비트 프로그램은 64 비트 DLL을로드 할 수 없으며 반대의 경우도 마찬가지입니다. 이것은 제 지식으로 보편적 인 제한입니다 (즉, 어떤 플랫폼에서도 작동하지 않을 것입니다). – Wug
예. 내 간단한 질문은 system.data.sqlite.dll 32 비트 버전으로 내 wcf 작업을 얻을 수 없다는 것입니다. – Proceso