Developing on a machine that has 2 SDKs.

Some of you may have both VS2008 and VS2010 installed on your machine and are developing against a 2.9 and 2.91 versions. Well if you haven’t already had to constantly run the SetCurrentSDK.bat files then you will soon enough. I just created some batch files to make my life a little easier.

The first part of this is to alter the SetCurrentSDK.bat files by removing the “pause” at the end of the files.

rem Blackbaud AppFx SDK version switch utility
rem Copyright 2012, Blackbaud, Inc.  All rights reserved.

@echo off

SetCurrentSDK.exe /s=localhost /db=OSU /VERBOSE /WAITONERROR

@echo Blackbaud AppFx SDK version switch completed.
pause   <——————————————————————————————————–remove this

cd “C:\BBEC\SDK\OSU_29\SDK\”
call “SetCurrentSDK.bat”
call “C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe”

As you can see the code above calls my 2.9 SetCurrentSDK.bat file and then launches VS2008. And below calls 2.91 and then launches VS2010.

cd “C:\BBEC\SDK\OSU_291\SDK\”
call “SetCurrentSDK.bat”
call “C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe”

Happy coding…Open-mouthed smile

Notes

1. If you don’t remove the “pause” command from that batch file then you will be prompted to “hit any key to continue” which can be annoying.

2. Also you could very well just as copy out the contents of you SetCurrentSDK.bat file into your own batch file, however I felt it easiest to just call that file after editing it. To each their own, just some info for your noggin.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s