This is a new install of Win7 64 bits, VS2012 (Update 3), AutoCAD 2013
In my 32-bit VM it works fine.
What's wrong in my installation?
Solved! Go to Solution.
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.
Can you check out from advance compiler option of your VS project that assembly is targeted for any CPU like below (red marked)?
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.