Visual Studio VS2003for AC2005, AC2006
Setup as per Lab 02. If anyone needs a hand, just Yell.
Visual Studio VS2005 EXPRESS EditionsInteractive Debugging for ACAD is not enabled.
Visual Studio VS2005There is an issue with debugging, and thankfully a work-around.
AutoCAD 2006 was written using the 1.1 version of the .NET framework.
VS2005 uses the 2.xx version.
Because of this mix, we can get what is called a LoaderLock/Deadlock when code is executed inside the unmanaged DllMain of a Mixed Mode DLL..
read <techno> :
http://msdn2.microsoft.com/en-us/library/ms172219.aspx The exception Mesasage looks like this :
LoaderLock was detected
Message: Attempting managed execution inside OS Loader lock.
Do not attempt to run managed code inside a DllMain or image initialization function
since doing so can cause the application to hang.
The Workaround : .. only until AC2007 release hopefully. This ONLY affects interactive DEBUGGING.
Create 2 registry files < text files > and save somewhere easily accessable from a file Explorer.
VS_debug_enable.regWindows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"MDA"="0"
VS_debug_disable.regWindows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"MDA"="1"
Just click the enabler
VS_debug_enable.reg whenever you want to work with ACAD2006 < or prior ? >
I reset using VS_debug_disable.reg when I'm finished a session.
PS:
Don't forget to add the path of your ACAD.exe in the Project Properties tab.
Normal F5 debugging should now be accessable without spitting the dummy.
Regards
Kerry
I hope all members have a Safe and Happy New Year !