Can't debug my project with AutoCAD2011

Can't debug my project with AutoCAD2011

Anonymous
Not applicable
1,019 Views
6 Replies
Message 1 of 7

Can't debug my project with AutoCAD2011

Anonymous
Not applicable

Hi Guys,

I have added reference acdbmgd/acmgd from C:\Program Files\Autodesk\AutoCAD 2011\  with copy local =false I can see from the list the version are 18.0.0.0

But when I start debug the project I got the following error

 

This project used to work with AutoCAD2010, now just moved to 2011 I can't even start debuging

 

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileLoadException: A procedure imported by 'acmgd, Version=18.0.0.0, Culture=neutral, PublicKeyToken=null' could not be loaded.
File name: 'acmgd, Version=18.0.0.0, Culture=neutral, PublicKeyToken=null' ---> System.Runtime.InteropServices.COMException (0x8007007F): The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)
   at System.ModuleHandle.ResolveMethod(Int32 methodToken, RuntimeTypeHandle* typeInstArgs, Int32 typeInstCount, RuntimeTypeHandle* methodInstArgs, Int32 methodInstCount)
   at System.ModuleHandle.ResolveMethodHandle(Int32 methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.Reflection.CustomAttributeData..ctor(Module scope, CustomAttributeRecord caRecord)
   at System.Reflection.CustomAttributeData.GetCustomAttributes(Module module, Int32 tkTarget)
   at System.Reflection.CustomAttributeData.GetCustomAttributes(Assembly target)
   at System.Resources.ResourceManager.GetNeutralResourcesLanguage(Assembly a, UltimateResourceFallbackLocation& fallbackLocation)
   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
   at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)
   at System.Resources.ResourceManager.GetStream(String name, CultureInfo culture)
   at MS.Internal.Resources.ResourceManagerWrapper.GetStream(String name)
   at MS.Internal.AppModel.ResourcePart.EnsureResourceLocationSet()
   at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
   at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
   at System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream()
   at System.IO.Packaging.PackWebResponse.GetResponseStream()
   at System.IO.Packaging.PackWebResponse.get_ContentType()
   at MS.Internal.WpfWebRequestHelper.GetContentType(WebResponse response)
   at MS.Internal.WpfWebRequestHelper.GetResponseStream(WebRequest request, ContentType& contentType)
   at System.Windows.ResourceDictionary.set_Source(Uri value)
   at Autodesk.AutoCAD.Internal.Windows.RibbonContent.get_AppFrameResources()
   at Autodesk.AutoCAD.Internal.Windows.RibbonContent.get_NonZeroDocQAT()
   at Autodesk.AutoCAD.Internal.Windows.RibbonContent.GetNonZeroDocumentQATControl(String sId)
   at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.LoadQuickAccessToolbarContent(MenuGroupData menuGroupData, Dictionary`2 workspaces, Dictionary`2 quickAccessToolbarItems)
   at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.LoadContent()
   at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.RestoreItems()
   at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.Initialize()
   at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.LoadQuickAccessToolbar()
   at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.OnApplicationIdle(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at Autodesk.AutoCAD.ApplicationServices.Application.raise_Idle(Object value0, EventArgs value1)
   at Autodesk.AutoCAD.ApplicationServices.Application.OnIdle()

 


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4959 (win7RTMGDR.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
acdbmgd
    Assembly Version: 18.1.0.0
    Win32 Version: 18.1.49.0.0
    CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202011/AcdbMgd.DLL
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
msvcm90
    Assembly Version: 9.0.30729.4974
    Win32 Version: 9.00.30729.4974
    CodeBase: file:///C:/Windows/WinSxS/x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4974_none_50940634bcb759...
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
PresentationFramework
    Assembly Version: 3.0.0.0
    Win32 Version: 3.0.6920.5001 built by: Win7RTMGDR
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/PresentationFramework/3.0.0.0__31bf3856ad364e35/PresentationFra...
----------------------------------------
WindowsBase
    Assembly Version: 3.0.0.0
    Win32 Version: 3.0.6920.5001 built by: Win7RTMGDR
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/WindowsBase/3.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
PresentationCore
    Assembly Version: 3.0.0.0
    Win32 Version: 3.0.6920.5001 built by: Win7RTMGDR
    CodeBase: file:///C:/Windows/assembly/GAC_32/PresentationCore/3.0.0.0__31bf3856ad364e35/PresentationCore.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configura...
----------------------------------------
AdApplicationFrame
    Assembly Version: 0.0.0.0
    Win32 Version: 3.0.264.0
    CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202011/AdApplicationFrame.DLL
----------------------------------------
AdWindows
    Assembly Version: 3.0.263.0
    Win32 Version: 3.0.263.0
    CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202011/AdWindows.DLL
----------------------------------------
PresentationFramework.Aero
    Assembly Version: 3.0.0.0
    Win32 Version: 3.0.6920.4902 built by: NetFXw7
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/PresentationFramework.Aero/3.0.0.0__31bf3856ad364e35/Presentati...
----------------------------------------
acmgd
    Assembly Version: 18.1.0.0
    Win32 Version: 18.1.49.0.0
    CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202011/acmgd.DLL
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.4926 built by: NetFXw7
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
AcWindows
    Assembly Version: 18.1.0.0
    Win32 Version: 18.1.49.0.0
    CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202011/AcWindows.DLL
----------------------------------------
AcWindows.resources
    Assembly Version: 18.1.0.0
    Win32 Version: 18.1.49.0.0
    CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202011/en-US/AcWindows.resources.DLL
----------------------------------------
AcCui
    Assembly Version: 18.1.0.0
    Win32 Version: 18.1.49.0.0
    CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202011/AcCui.DLL
----------------------------------------
AcWindows
    Assembly Version: 18.0.0.0
    Win32 Version: 18.0.55.0.0
    CodeBase: file:///C:/Program%20Files/Fifth%20Dimension/StorePlan%20HQ/AcWindows.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.F...
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


 

Any ideas?

 

Thanks very much

0 Likes
1,020 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

Well, I'm not sure what is causing your error, but you aren't supposed to reference the .dll files from your AutoCAD folder... you are supposed to reference them from the ObjectARX folder on C: drive. If you don't have that, you should install the ObjectARX SDK.

 

I'm not sure this has anything to do with your problem, but all the documentation I've read says that is the way to go, and it works for me.

 

Good luck and report back here if that helps or doesn't help. Maybe somebody else will have an idea.

 

0 Likes
Message 3 of 7

Anonymous
Not applicable

Hi Steven,

 

Thanks for reply. i downloaded objectARX and re reference them to c:objectarx 2011\inc\

 

but the error is the sameSmiley Sad

 

BTW: i am using VB2008

 

The funny thing is I created a new project and it works fine, just the old one which works perfect in AutoCAD2010

0 Likes
Message 4 of 7

chiefbraincloud
Collaborator
Collaborator

It does not matter where you reference the files from, the files that are loaded at runtime will still be the files from the AutoCAD directory.  (AutoCAD is loaded in the normal fashion prior to you netloading your project into AutoCAD, therefore the necessary files have already been loaded into memory and are used as such.)  The files from the ObjectARX folder will not get loaded on top of the others just because you reference them. 

 

Think of an end user machine that does not have the ObjectARX files.

 

The reason for referencing the ObjectARX files is that certain dependancies have been removed from those files.

Dave O.                                                                  Sig-Logos32.png
0 Likes
Message 5 of 7

StephenPreston
Alumni
Alumni

Did you set Copy Local to False for the two AutoCAD assemblies?

 

Cheers,

 

Stephen Preston

Autodesk Developer Network

Cheers,

Stephen Preston
Autodesk Developer Network
0 Likes
Message 6 of 7

Anonymous
Not applicable

I assume you changed you project to start 2011 not 2010.

 

What other references are in your project.

 

I had some simillar problems but it came down references. Make sure all the that the paths are to AC2011 even if copy local is false.

 

 

0 Likes
Message 7 of 7

Anonymous
Not applicable

Hi Guys,

 

I solved my problem by deleting local copy AcWindows.DLL.

 

I don't know why, but that solved the problem

 

Thanks for your help