Author Topic: Setup and Debugging with VS2008Express for AC2008  (Read 8956 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Setup and Debugging with VS2008Express for AC2008
« on: November 29, 2007, 02:59:51 AM »
I'm setting up a code template for VS2008Express for AC2008, which I'll post here later.

One embuggerance is actually finding the Reference Dll's amongst the myriad in the ACAD Root ( where the ACAD,EXE is located )
 
This tip may make the task a little easier :
Rt Click references, select Add References... to display the 'Add References' dialog.
If the files are not shown in the 'Recent' Tab ;
Select the 'Browse' Tab,
In the FileName fiels enter *mgd* and press enter ...

Select the files you want from the filtered list .. you can Multiselect ..

When that is done, it's a good time to set the CopyLocal property of the reference files
acdbmgd and acmgd to False
Select the name in the Solution Explorer,
and set the CopyLocal field value to False

Then control how to handle a possible LoaderLock Exception ;
From the TopMenu, Select Debug-> Exceptions...
In the resulting dialog select the 'Managed Debugging Assistants' tree,
find the LoaderLock entry and toggle the value OFF.
Select OK.

more to follow.

Note: 
My CAD is located at C:\ACAD2008  ... yours may differ.      ( not default)
My VS2008 Projects, Settings, Templates  are located at ..MyDocuments\Visual Studio 2008\...  ( the default)

the piccys:
« Last Edit: November 29, 2007, 03:02:05 AM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Glenn R

  • Guest
Re: Setup and Debugging with VS2008Express for AC2008
« Reply #1 on: November 29, 2007, 04:52:07 AM »
Nice one Kerry. Can you debug class libraries in 2008 express yet?

Cheers,
Glenn.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Setup and Debugging with VS2008Express for AC2008
« Reply #2 on: November 29, 2007, 04:52:25 AM »
ok, I seem to be able to reproduce the config.

I'll post the details after I've done a little more testing.
.. in the MeanTime :-
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Glenn R

  • Guest
Re: Setup and Debugging with VS2008Express for AC2008
« Reply #3 on: November 29, 2007, 05:00:01 AM »
Are you referring to the xml file that Kean had on his blog? If so, that answers my question - still no native debugging for class libraries in Express...or am I wrong?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Setup and Debugging with VS2008Express for AC2008
« Reply #4 on: November 29, 2007, 05:49:05 AM »
no native debugging Glenn .. need to hack it .. but it's pretty similar to VS2005Express.

next,

Remember to set the CopyLocal field value for acmgd and acdbmgd to False
and set the LoaderLock toggle value OFF.

If we create a simple project, save it,  and try to "Start Debugging" ( F5 ) we get an error ( see Piccy-01)

Have a look at our File Manager , (piccy-02) we see a xxx.csproj and a xxx.csproj.user file.

Open the xxx.csproj.user file in a text editor and replace the contents with this :
Note, it's similar to the VS2005 user file but slightly different.
I'd suggest saving a copy of this file somewhere handy.
Quote
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <StartAction>Program</StartAction>
    <StartProgram>C:\ACAD2008\acad.exe</StartProgram>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <StartAction>Program</StartAction>
    <StartProgram>C:\ACAD2008\acad.exe</StartProgram>
  </PropertyGroup>
  <PropertyGroup>
    <PublishUrlHistory>
    </PublishUrlHistory>
    <InstallUrlHistory>
    </InstallUrlHistory>
    <SupportUrlHistory>
    </SupportUrlHistory>
    <UpdateUrlHistory>
    </UpdateUrlHistory>
    <BootstrapperUrlHistory>
    </BootstrapperUrlHistory>
    <FallbackCulture>en-US</FallbackCulture>
    <VerifyUploadedFiles>true</VerifyUploadedFiles>
  </PropertyGroup>
</Project>


Now, this is different to VS2005.
Open the xxx.csproj file in a text editor.

There is a line that reads
<DebugType>full</DebugType>

change it to
<DebugType>pdbonly</DebugType>

Save the file

.. and away you go ...

the piccys :-
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Glenn R

  • Guest
Re: Setup and Debugging with VS2008Express for AC2008
« Reply #5 on: November 29, 2007, 05:54:09 AM »
Nicely done - bravo Kerry. Notice how I'm getting the local lingo and what not what :)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Setup and Debugging with VS2008Express for AC2008
« Reply #6 on: November 29, 2007, 06:02:27 AM »
Nicely done - bravo Kerry. Notice how I'm getting the local lingo and what not what :)

hehehe .. with the plum in the mouth and all I imagine, yes ?

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Glenn R

  • Guest
Re: Setup and Debugging with VS2008Express for AC2008
« Reply #7 on: November 29, 2007, 06:05:01 AM »
Haven't quite progressed that far yet....... :-D

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Setup and Debugging with VS2008Express for AC2008
« Reply #8 on: November 29, 2007, 06:06:34 AM »
Now for the Template.
[Jamie Oliver]
here's one that was prepared earlier
[/Jamie Oliver]
edit/add: The Template Zip is at the bottom of the post.

Copy the Zip intact (unzipped) where shown.
Start a new Project .. the template should be there

« Last Edit: November 29, 2007, 07:18:55 AM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Setup and Debugging with VS2008Express for AC2008
« Reply #9 on: November 29, 2007, 06:15:34 AM »


For anyone following along ;
this looks more daunting than it actually is !
.. but if you have trouble just yell ; someone here will be able to help I'm certain.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Glenn R

  • Guest
Re: Setup and Debugging with VS2008Express for AC2008
« Reply #10 on: November 29, 2007, 06:20:31 AM »
Jolly good show old bean! :-D

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Setup and Debugging with VS2008Express for AC2008
« Reply #11 on: November 29, 2007, 06:30:16 AM »
 :-D

cheeky twit !
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8712
  • AKA Daniel
Re: Setup and Debugging with VS2008Express for AC2008
« Reply #12 on: November 29, 2007, 06:33:46 AM »
Great stuff Kerry!
Note: my install of VS2008 C# express did not have the Advanced Build Configurations turned on, something that I find useful I would post a pic, but I am somewhere in Hangzhou, China  :-o
« Last Edit: November 29, 2007, 06:35:15 AM by Daniel »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Setup and Debugging with VS2008Express for AC2008
« Reply #13 on: November 29, 2007, 06:46:55 AM »
Thats a long way from HongKong Dan.
[fastideous check]
.. located in the Yangtze River Delta .. Located 180 km southwest of Shanghai, as of 2004 the entire Hangzhou Municipality <..>  had a registered population of 6.5 million people.
[back to normal]

Advanced Build Configurations :-
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Chuck Gabriel

  • Guest
Re: Setup and Debugging with VS2008Express for AC2008
« Reply #14 on: November 29, 2007, 07:00:45 AM »
Thanks for taking the time to share this Kerry.  I actually bookmarked this thread (something that I've NEVER done before).