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

Edit and continue won't work with vs2005?

10 REPLIES 10
Reply
Message 1 of 11
dahovey
474 Views, 10 Replies

Edit and continue won't work with vs2005?

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
10 REPLIES 10
Message 2 of 11
Anonymous
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
Message 3 of 11
dahovey
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
Message 4 of 11
Anonymous
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
Message 5 of 11
dahovey
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
Message 6 of 11
Anonymous
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
Message 7 of 11
cgay
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.
Message 8 of 11
dahovey
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!
Message 9 of 11
dahovey
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
Message 10 of 11
cgay
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?
Message 11 of 11
dahovey
in reply to: dahovey

well. i said it would be a obvious problem. and it was...
i should have tryed creating a new class library project and started from scratch but i thought i could get it to work with what i had...

the problem ended up being that i changed the output directory in the project options...under compile i changed it to a dir on the root of my harddrive that way it would be easy to select when netloading it.

i'm assuming that visual studio was trying to debug with that dll. And regardless i shouldn't need an advantage like that because of the autoloading script. i just need to open the project and debug.

this has been interesting...

Thanks! for all your help.

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