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

Message "Click here to reload the designer" on loading XAML-file in VS2012

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
info
2672 Views, 5 Replies

Message "Click here to reload the designer" on loading XAML-file in VS2012

This is a new install of Win7 64 bits, VS2012 (Update 3), AutoCAD 2013

My steps:

  1. Create a new project: "WPF User Control Library"
  2. Add a this project a new "Window" (xaml)
  3. Load the new Window. It loads fine.
  4. Add a Reference to: "C:\Program Files\Autodesk\AutoCAD 2013\accoremgd.dll"
  5. Rebuild the solution. Now the Window (xaml) shows the next error: An Unhandled Exception has occurred -- Click here to reload the designer -- Details: -- System.IO.FileNotFoundException -- Could not load file or assembly 'accoremgd, Version=19.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

 In my 32-bit VM it works fine.

What's wrong in my installation?

Kind regards

5 REPLIES 5
Message 2 of 6
mzakiralam
in reply to: info

you can check this link if you have not already noticed this one

http://msdn.microsoft.com/en-us/library/bb907398(v=vs.90).aspx
Message 3 of 6
info
in reply to: mzakiralam

The problem only occurs in 64-bit OS when I add the reference to the "accoremgd.dll" of AutoCAD 2013.

This XAML-file has no link with this reference.

Message 4 of 6
mzakiralam
in reply to: info

Can you check out from advance compiler option of your VS project that assembly is targeted for any CPU like below (red marked)?

 

Capture3.JPG

Message 5 of 6
norman.yuan
in reply to: info

The problem you have experience could be because of you setting reference to AutoCAD .NET API assemblies installed with AutoCAD, not to the ones from ObjectARX SDK.

 

This is a known issue, especially in early stage when AutoCAD .NET API became available (Acad2005/6). At that time, people directly set references to acdbmgd/acmgd.dll in Acad installation folder and found that the windows form designer in VS crashed very often.

 

The reason is when VS loading Wim form in designed, it has to resolve all the referenced types/classes. The acad .NET assemblies are wrappers of unmanaged ObjectARX, thus have some dependencies that may only available when AutoCAD is running, thsu where the crash comes.

 

Later, Autodesk supplied a strip-down version of the .NET assemblies for development in ObjectARX SKD, which removed some of those dependencies. The version of assemblies coming with SDK is like C++ header file, which is only for development to resolve types and their methods/properties.... That is why it is strongly recommended you set references to the ones coming from SDK, not from the AutoCAD installation, and not distribute the accemblies with your code (set "Copy Local" to "False").

 

Since I saw you mentioned you set reference to "C:\...\AutoCAD 2012\...", which must be AutoCAD installation folder, so I thought this might be the cuase of your problem.

 

Message 6 of 6
info
in reply to: norman.yuan

Thank you very much!

This was the solution for my problem...

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