.NET

Reply
Valued Contributor
dahovey
Posts: 81
Registered: ‎07-27-2006
Message 1 of 11 (180 Views)

Edit and continue won't work with vs2005?

180 Views, 10 Replies
07-27-2006 01:08 PM
I'm using vs2005-vb.net- and autocad 2006. I've been hearing alot that with vs2005 you won't need to unload a .net dll so much because of the edit and continue feature in vs2005.

But how can i get it to work. What I've been doing is - with my class library dll i'm debuging using vs2005 to run acad.exe...i have my dll auto loaded in the registry. when i run my command with a breakpoint in the sub routine i can debug the dll. but I can't make any changes...what is more when autocad starts i get two LoaderLoack errors when i click continue to both...then i can debug?????

frustrating!

Please help.
David Hovey
dahovey@gmail.com

Message was edited by: dahovey Message was edited by: dahovey
*Jimmy Bergmark
Message 2 of 11 (180 Views)

Re: Edit and continue won't work with vs2005?

07-27-2006 01:27 PM in reply to: dahovey
There is a setting in Options>Debugging>Edit and Continue

--
Best Regards, Jimmy Bergmark
Owner/Developer - JTB World - Software development and Consulting
Blog: http://jtbworld.blogspot.com
JTB FlexReport (FLEXnet / FLEXlm report tool) -
http://www.jtbworld.com/jtbflexreport
SmartPurger (Batch script and purge) -
http://www.jtbworld.com/smartpurger.htm
or download some freeware at http://www.jtbworld.com
More on AutoCAD 2006 and 2007
http://www.jtbworld.com/autocad2006.htm
http://www.jtbworld.com/autocad2007.htm


wrote in message news:5250956@discussion.autodesk.com...
I'm using vs2005-vb.net- and autocad 2006. I've been hearing alot that with
vs2005 you won't need to unload a .net dll so much because of the edit and
continue feature in vs2005.

But how can i get it to work. What I've been doing is - with my class
library dll i'm debuging using vs2005 to run acad.exe...i have my dll auto
loaded in the registry. when i run my command with a breakpoint in the sub
routine i can debug the dll. but I can't make any changes...what is more
when autocad starts i get two LoaderLoack errors when i click continue to
both...then i can debug?????

frustrating!

Please help.
David Hovey
dahovey@gmail.com

Message was edited by: dahovey

Message was edited by: dahovey
Valued Contributor
dahovey
Posts: 81
Registered: ‎07-27-2006
Message 3 of 11 (180 Views)

Re: Edit and continue won't work with vs2005?

07-27-2006 01:41 PM in reply to: dahovey
There isn't an option that seems to apply...i have edit and continue selected in the options box...but there isn't anything that specifies that the code should be read only...

dahovey@gmail.com
*Jimmy Bergmark
Message 4 of 11 (180 Views)

Re: Edit and continue won't work with vs2005?

07-27-2006 01:47 PM in reply to: dahovey
Could this be it?
http://jtbworld.blogspot.com/2006/04/debug-net-dlls-in-autocad-2007.html

--
Best Regards, Jimmy Bergmark
Owner/Developer - JTB World - Software development and Consulting
Blog: http://jtbworld.blogspot.com
JTB FlexReport (FLEXnet / FLEXlm report tool) -
http://www.jtbworld.com/jtbflexreport
SmartPurger (Batch script and purge) -
http://www.jtbworld.com/smartpurger.htm
or download some freeware at http://www.jtbworld.com
More on AutoCAD 2006 and 2007
http://www.jtbworld.com/autocad2006.htm
http://www.jtbworld.com/autocad2007.htm


wrote in message news:5250995@discussion.autodesk.com...
There isn't an option that seems to apply...i have edit and continue
selected in the options box...but there isn't anything that specifies that
the code should be read only...

dahovey@gmail.com
Valued Contributor
dahovey
Posts: 81
Registered: ‎07-27-2006
Message 5 of 11 (180 Views)

Re: Edit and continue won't work with vs2005?

07-27-2006 05:20 PM in reply to: dahovey
No didn't work.
I changed working dir to autocad 2006 folder...
and acmgd.dll "copy local" is set to false.

excellent resource...but same problem...could it be there is a option to make the source read only that i'm just not seeing...or judging my the article you reference-its a problem with acmgd.dll???

-dh Message was edited by: dahovey
*Paul Richardson
Message 6 of 11 (180 Views)

Re: Edit and continue won't work with vs2005?

07-27-2006 06:19 PM in reply to: dahovey
<.what is more when autocad starts i get two LoaderLoack errors when i click
continue to both...then i can debug?????
Are you using an Express Edition?
Debug->Exceptions->Managed Debugging Assistantants->uncheck loaderlock

wrote in message news:5250956@discussion.autodesk.com...
I'm using vs2005-vb.net- and autocad 2006. I've been hearing alot that with
vs2005 you won't need to unload a .net dll so much because of the edit and
continue feature in vs2005.

But how can i get it to work. What I've been doing is - with my class
library dll i'm debuging using vs2005 to run acad.exe...i have my dll auto
loaded in the registry. when i run my command with a breakpoint in the sub
routine i can debug the dll. but I can't make any changes...what is more
when autocad starts i get two LoaderLoack errors when i click continue to
both...then i can debug?????

frustrating!

Please help.
David Hovey
dahovey@gmail.com

Message was edited by: dahovey

Message was edited by: dahovey
Distinguished Contributor
cgay
Posts: 125
Registered: ‎08-02-2005
Message 7 of 11 (180 Views)

Re: Edit and continue won't work with vs2005?

07-27-2006 06:43 PM in reply to: dahovey
dahovey,

1.) don't autoload dll from registry for E&C to work. Instead, load it manually or from a ACAD Script.
Look for my post on this thread to see how I load it:
http://discussion.autodesk.com/thread.jspa?messageID=5035412

2.) The loader locks messages are part of the new Managed Debug Assistants. You can disable the LoaderLock MDA for a project, or for all projects.
Look Here:
http://discussion.autodesk.com/thread.jspa?messageID=5041866

3.) Make sure E&C is enabled. Tools | Options | Debugging | Edit and Continue, i think.
Valued Contributor
dahovey
Posts: 81
Registered: ‎07-27-2006
Message 8 of 11 (180 Views)

Re: Edit and continue won't work with vs2005?

07-28-2006 09:30 AM in reply to: dahovey
The mda loader problem is fixed. Thanks! now i don't get the error...

But e&c still won't work...i no longer use the registry to load the dll...i manually type in netload and select my dll in the dialog box.
I have e&c selected in the options dialog.

This is odd. Is there is anything else. watch this be an obvious problem.

Thanks for your help!
Valued Contributor
dahovey
Posts: 81
Registered: ‎07-27-2006
Message 9 of 11 (180 Views)

Re: Edit and continue won't work with vs2005?

07-28-2006 12:07 PM in reply to: dahovey
WELL THATS NOT GOOD.

take a look at the msdn article i found...appearantly you can't use edit and continue with visual basic.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxgrfeditcontinuevisualcvisualbasic.asp
Distinguished Contributor
cgay
Posts: 125
Registered: ‎08-02-2005
Message 10 of 11 (180 Views)

Re: Edit and continue won't work with vs2005?

07-28-2006 01:40 PM in reply to: dahovey
No, No, No.......I've used it several times today.
See here:
http://msdn2.microsoft.com/en-us/library/ba77s56w.aspx

First, load your project in Visual Studio 2005, then:
1.) Make sure E&C is enabled for VB projects.
Tools->Options->Debugging->Enable Edit And Continue (checked)

2.) Make sure that Visual Studio is loading AutoCAD when you debug.

3.)Your project must be in "Debug" configuration.

4.)'Project' Menu->"Project Name" Properties->Debug->

a.) Start Action set to "Start External Program:"

b.) "C:\Program Files\AutoCAD 200(6/7)\acad.exe" or whereever autocad exists on your machine, as the external program.

c.) you can include command line arguments to i.e. load a drawing you like to work with, load a script to "Netload" your dll, etc...

d.) Not too sure 'bout this one, but on my machine, "Enable the Visual Studio hosting Process" is checked.

e.) Close the Properties window "Saving" changes when asked.

5.) Set a breakpoint on a spot you want to stop code execution

6.) Debug->Start Debugging (OR) F5 (OR) Click the Play button

7.) The debug session will start and AutoCAD will load into the debugger process (required for E&C).

8.) Net load your DLL into the AutoCAD session if needed

9.) execute your command in AutoCAD. Execution will stop at the breakpoint you set in step 5.

10.) Modify some code. There are some limits as to what can be modified (check above web page for details)

11.) you can use the "Set Next Statement" menu item (under debug) to reprocess changed code.

12.) Hopefully it works for you now.

What version of VB.NET 2005 are you using BTW?
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.