Author Topic: Unknown build error  (Read 4422 times)

0 Members and 1 Guest are viewing this topic.

shers

  • Guest
Unknown build error
« on: August 18, 2015, 05:40:06 AM »
Hi,

I am trying to migrate my application developed for ACAD 2012 to ACAD 2013. I have reference the dlls like accoremdg.dll, acdbmgd.dll and acmgd.dll from the corresponding folder. However, I get 1 error and 3 warnings as below.

Warnings:

1 Warning   1   There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "accoremgd", "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.

2. Warning   2   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.

3. Warning   3   There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "acmgd", "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.

Error:

4. Unknown build error, 'Could not load type 'Autodesk.AutoCAD.Runtime.CommandClassAttribute' from assembly 'Acmgd, Version=19.0.0.0, Culture=neutral, PublicKeyToken=null'

Please help.

Thanks
 

BlackBox

  • King Gator
  • Posts: 3770
Re: Unknown build error
« Reply #1 on: August 18, 2015, 03:16:50 PM »
What are your build settings; Debug + Any CPU?

Which ObjectARX SDK are you loading the assembly references from?
"How we think determines what we do, and what we do determines what we get."

shers

  • Guest
Re: Unknown build error
« Reply #2 on: August 18, 2015, 11:31:15 PM »
Build settings is Release + Any CPU. However, I tried with x86 and x64. But with x64, the warnings vanish and the error remains.

I load the dlls from AutoCAD application folder.

Thanks

Jeff H

  • Needs a day job
  • Posts: 6151
Re: Unknown build error
« Reply #3 on: August 19, 2015, 12:20:32 AM »
have you tried a clean rebuild?

shers

  • Guest
Re: Unknown build error
« Reply #4 on: August 19, 2015, 12:49:15 AM »
yes

Jeff H

  • Needs a day job
  • Posts: 6151

shers

  • Guest
Re: Unknown build error
« Reply #6 on: August 19, 2015, 02:49:10 AM »
Yes, I have referenced that as well.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Unknown build error
« Reply #7 on: August 19, 2015, 03:52:56 AM »
If I had to guess I'd say you're using a 64 bit dll in a 32 bit machine.

What are your computer specs ?
Which version of Visual Studio ?
Which version of dot.net ?


Can you :
copy your complete solution and remove proprietary (or confidential )  information.
I assume the compile will still fail.
Zip the bare minimum complete solution folder and post it here ( with the .sln and .cproj files)
Someone who has matching specifications may be able to determine the issues.


Personally I'd start with a bare bones solution that compiles and add the references (and code) until it fails.

... and keep notes.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Jeff H

  • Needs a day job
  • Posts: 6151
Re: Unknown build error
« Reply #8 on: August 19, 2015, 04:37:40 AM »
  • Remove all references to autocad
  • Delete any autocad dll that might have been copied bin folder.
  • Clean Solution
  • Add reference back and set copy local to false

It is referencing 2012 assemblies somehow because it trying to look in Acmgd instead of AcCoreMgd
Error:

4. Unknown build error, 'Could not load type 'Autodesk.AutoCAD.Runtime.CommandClassAttribute' from assembly 'Acmgd, Version=19.0.0.0, Culture=neutral, PublicKeyToken=null'

Please help.

Thanks


shers

  • Guest
Re: Unknown build error
« Reply #9 on: August 20, 2015, 02:25:03 AM »
Thanks very much! I solved the problem.

I had referenced a dll that in turn referenced a previous version of AutoCAD dll. When I removed that dll, the problem is solved.

Thanks