.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Compiling - Platform

1 REPLY 1
Reply
Message 1 of 2
Ertqwa
367 Views, 1 Reply

Compiling - Platform

Hello Forum,

 

I used to compile my .NET dll (C#, AutoCAD 2012) for platform "Any CPU". But recently I get the following warning:

 

There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "acdbmgd", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 

When I change the platform to "x64", the warning is gone, but I get the following error when I try to load the dll in AutoCAD:

 

NETLOAD Assembly file name: C:/test.dll Cannot load assembly. Error 
details: System.IO.FileNotFoundException: Could not load file or assembly 
'file:///C:\test.dll' or one of its dependencies. 
The system cannot find the file specified.
File name: 'file:///C:\test.dll'
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String 
codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, 
StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, 
Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName 
assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, 
StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, 
Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName 
assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, 
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean 
forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, 
Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm 
hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, 
StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
   at loadmgd()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value 
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure 
logging.
To turn this feature off, remove the registry value 
[HKLM\Software\Microsoft\Fusion!EnableLog].

 As far as I know, I did not change anything in the code or project (windows .NET update?).  What can I do to fix the warning?

 

Ty for any help/insight.

 

 

 

 

 

1 REPLY 1
Message 2 of 2
SENL1362
in reply to: Ertqwa

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost