Minimize
 Old Town IT 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:

10 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

One suggestion,

There are now two installers - 1 for VS 2005(Available on codeplex) and 2nd for VS 2008(developed by you).

Is there any property we can change in installer to allow side by side execution. Most people have VS 2005(Old projects) and VS 2008(new development).

Thanks,
Maulik Modi

By Maulik Modi on   1/27/2009 7:09 AM

I had to uninstall "VS 2005 Subsonic Tools" in order to continue setup of "VS 2008 Subsonic Tools installer"

By Maulik Modi on   1/27/2009 7:13 AM

Hi Mauklik,

I've had the same issue with the tools installer. I've just hobbled along until now, slowly switching projects over to VS 2008 as needed. I thought I saw someone claim to have been able to use the VS 2005 version in 2008 without having to run the installer, but I didn't have time to follow up on the claim. If you find something that works, I would love to know about it so I can post a link here.

Thanks,

Don

By Don Worthley on   1/27/2009 9:52 AM

Hi,

I tried your suggestions on VS2010 RC and they still apply, I just wrote 2010 instead of 2008.

Thank you!

By Luciano on   3/5/2010 8:10 AM

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment   Cancel 
  
 

Old Town IT LLC | 703.579.6930  | info@oldtownit.com Register   |  Login

Copyright Old Town IT LLC | Privacy Policy: Old Town IT will never share your information with anyone without your permission.