IT Crossing
Thursday, December 04, 2008 | Register | Login 
Minimize
 IT Crossing Blog
Jun 27

Written by: Don Worthley
6/27/2008 4:25 PM 

imageThose using SubSonic Tools for Visual Studio will be glad to know that it's easy to upgrade to Visual Studio 2008.  Here's how...Simply download the source from CodePlex and make the following changes:

  • Change the SubSonicAddin.Addin file as follows (found in the SubSonicAddin directory):

image

  • The changes you'll make in SubSonicAddin.Addin are:  Change version to 9.0 and change SubSonicAddin.dll to the actual path where you intend to save the dll.  I saved my dll in c:\Program Files\SubSonic\VS2008 and so I entered the following for the Assembly tag:  c:\Program Files\SubSonic\VS2008\SubSonicAddin.dll.
  • Copy SubSonicAddin.Addin to the Addin directory for VS 2008, which you may have to create.  The normal location for this directory is:  ...\My Documents\Visual Studio 2008\Addins

  • Open the solution in Visual Studio and change the references for the SubSonicAddin project as follows (all we did was remove the references to Microsoft Development Environment 8.0 and add the reference to Microsoft Development Environment 9.0):

image

  • Compile the project and make sure the file SubSonicAddin.dll is saved in the location specified in the Assembly entity in the SubSonicAddin.Addin config file noted above.

In addition to following the steps outlined in the first two tabs to manually install the addin, you can also update the installer project to create a new installer that will install the addin within Visual Studio 2008.  Here are the steps you would need to follow:

image
  • image Open AddinInstaller.cs as shown below and find line 61 which should start with: string addinTargetPath.  In this line, change 2005 to 2008.
  • Next, double click on the Content Files from SubSonicAddin (Active) node in the solution explorer as shown on the right.

  • In the center of the screen, you will see the Addins folder as follows:

    image
  • Select the AddIns folder and hit F4 to view the properties window.  
  • Change the DefaultLocation property to read: [PersonalFolder]\Visual Studio 2008\Addins.
  • Rebuild the entire solution.
  • You may need to also explicitly rebuild the AddinCustomAction project to make sure the dll is created
  • Build the SubSonicToolsSetup project.

In addition to the changes outlined above, you may want to perform a global find (CTRL + SHIFT + F) and replace 2005 with 2008 where appropriate.  Be careful, though.  Some instances of the string 2005 are for SQL 2005.

If you're interested use our Contact Us form to let us know that you would like to receive a copy of the modified solution.


Thanks to berni2802 from the SubSonic forums for letting us know about this fix.

Tags:

6 comment(s) so far...

Could you attach your .MSI compiled for VS 2008?

By earljon on   8/4/2008 1:05 AM

I hesitate to add this since this will probably be available from the project site soon, but if it's needed before then, you can access the msi file I used here. Of course, the usual disclaimers apply (ie. use at your own risk, etc.). With that said, HTH.

By Don Worthley on   8/4/2008 9:36 AM

Thank you very much Don! Much appreciated!

By earljon on   8/4/2008 8:15 PM

Hey, no problem. I'm glad you found it helpful.

By Don Worthley on   8/5/2008 12:18 PM

Thank you.

By Yatkha on   8/27/2008 9:13 PM

Thanks dear, it was greatly helpful!!

By aman.tur on   11/7/2008 5:22 AM

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Comment:
Add Comment   Cancel