0

男士们,

我想知道是否有任何方法可以配置 autocad.exe.config 文件,使其适用于 32 位版本的 .net 框架。我正在为 64 位机器(Windows 7)中的 32 位 autocad 2008 开发一个应用程序,该应用程序从访问数据库(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.
4

0 回答 0