Vb.net Autocad.net framework 32位选择

Vb.net Autocad.net framework 32位选择,vb.net,oledb,32-bit,autocad,Vb.net,Oledb,32 Bit,Autocad,先生们 我想知道是否有任何方法可以配置autocad.exe.config文件,使其与32位版本的.net framework配合使用。 我正在64位计算机(windows 7)中为autocad 2008开发一个32位应用程序,该应用程序从access数据库(32位)获取一些数据,因此出现了臭名昭著的“microsoft.ace.oledb.12.0提供程序未在本地计算机上注册”错误。 在寻找解决方案时,我发现解决此问题的唯一方法是在VS中以x86计算机为目标,但Autocad无法加载该应用程

先生们

我想知道是否有任何方法可以配置autocad.exe.config文件,使其与32位版本的.net framework配合使用。 我正在64位计算机(windows 7)中为autocad 2008开发一个32位应用程序,该应用程序从access数据库(32位)获取一些数据,因此出现了臭名昭著的“microsoft.ace.oledb.12.0提供程序未在本地计算机上注册”错误。 在寻找解决方案时,我发现解决此问题的唯一方法是在VS中以x86计算机为目标,但Autocad无法加载该应用程序,因为它正在从framework64文件夹读取.net配置

更新: 这是加载x86应用程序时在autocad命令行中遇到的错误:

Cannot load assembly. Error details: System.BadImageFormatException: Could not 
load file or assembly 
'file:///C:\@Documentos\Personales\CODING\AutoCad\vb.net\OleDBTest\ClassLibrary1
\bin\Debug\ClassLibrary1.dll' or one of its dependencies. An attempt was made 
to load a program with an incorrect format.
File name: 
'file:///C:\@Documentos\Personales\CODING\AutoCad\vb.net\OleDBTest\ClassLibrary1
\bin\Debug\ClassLibrary1.dll'
   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, 
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, 
Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, 
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
   at loadmgd()
=== Pre-bind state information ===
LOG: User = GLOBAL\rodrigo.cortes
LOG: Where-ref bind. Location = 
C:\@Documentos\Personales\CODING\AutoCad\vb.net\OleDBTest\ClassLibrary1\bin\Debu
g\ClassLibrary1.dll
LOG: Appbase = file:///C:/Program Files/AutoCAD 2008/
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:\Program Files\AutoCAD 
2008\acad.exe.Config
LOG: Using machine configuration file from 
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Attempting download of new URL 
file:///C:/@Documentos/Personales/CODING/AutoCad/vb.net/OleDBTest/ClassLibrary1/
bin/Debug/ClassLibrary1.dll.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

您能否将访问代码分离到一个单独的32位目标项目中,并将其余代码保留在一个64位目标项目中???(只是猜测)因此Autocad将加载64位dll,而您的64位dll将读取32位access dll。(我不确定这是否可行,但如果没有其他显示,我会尝试)只有该提供程序的64位版本不可用。因此,您必须运行64位版本的Autocad。不,你不能解决这个问题,在一个过程中混合比特是不可能的。转换到另一个数据库显然是一条前进的道路。我所尝试的是:任何cpu->autocad加载应用程序,OleDbConnection.Open方法都会抛出臭名昭著的错误。x64->与之前相同。x32->autocad不加载应用程序。我想我最好的办法是把所有与数据库相关的代码移到vba上,但我不知道如何连接vba和vb。我不知道,但也许这会有帮助。