Archive for the ‘Visual Studio’ Category

Mystery tab #13119

Monday, April 14th, 2008

Since a couple of weeks I had this #13119 tab in the toolbox of Visual Studio. The only way I found to fix this was to go into C:\Documents and Settings\[UserName]\Local Settings\Application Data\Microsoft\VisualStudio\9.0 folder, replace [UserName] with your username, and delete the four files which have Toolbox in their name (toolbox.tbd, toolboxIndex.tbd, toolbox_reset.tbd, toolboxIndex_reset.tbd). Visual Studio regenerates these when you start it up. Full thread on MSDN can be found here.

Buildserver upgrade

Monday, April 7th, 2008

We recently started the move from visual studio 2005 to 2008 and since then our buildserver has had problems with those upgraded projects.

The first error I ran into was: File format version is not recognized.  MSBuild can only read solution files between versions 7.0 and 9.0, inclusive. Our server runs CruiseControl v1.3.0.2958 which by default targets the 2.0 framework, so you need to direct your MSBuild task to the new 3.5 version. You do this by using the executable node illustrated below:


Second error: The imported project “C:Program FilesMSBuildMicrosoftVisualStudiov9.0WebApplicationsMicrosoft.WebApplication.targets” was not found. To fix this one you need to look on your development machine for that file, it’s on the same location as stated by the error if you’re using a regular install. Then go to your buildserver and recreate the same folder structure there and copy the file.

Third error: C:WINDOWSMicrosoft.NETFrameworkv3.5Microsoft.Common.targets (1734,9):  error MSB3091: Task failed because “LC.exe” was not found, or the correct Microsoft Windows SDK is not installed. The error message is larger than I’ve put here since it gives 4 ways to solve it. The easiest and probably fastest way to solve this is to download the Windows SDK for Windows 2008 and install it on your buildserver, you can find it here. It is an iso file of 1.3 GB, so make sure you have a fast connection.

Now your server has been successfully upgraded ;) .

Cleanup Folder with SDC Tasks Library

Monday, April 7th, 2008

I had to automate the deletion of the contents of a folder for one of our projects in the buildserver, one google later I ran into the SDC Tasks Library (2.1.3009.0) which had just that. The pdf file included described how to make their library available in your build script, I followed the instructions but kept running into build errors. The Cleanup task was not found by MSBuild, turned out I needed to add a trailing backslash to the path name of the TasksPath property. The final configuration is:

<!– SDC MSBuild Tools –>
<Import Project=“$(TasksPath)\Microsoft.Sdc.Common.tasks“/>
<!– SDC MSBuild Tools –>

But even with this now corrected the Cleanup folder task was not found, again I opened up their tasks file with notepad and searched for the Cleanup task, I couldn’t find it. Hmm, maybe I’m going blind so let’s use ctrl+f. Again no results. So I edited the file and put this entry to the list of tasks:

<UsingTask AssemblyFile=“$(TasksPath)Microsoft.Sdc.Tasks.dll“ TaskName=“Microsoft.Sdc.Tasks.Folder.CleanFolder“/>

Ran MSBuild again, and now successfull. For anyone who doesn’t want to edit the file, I’ve attached it.

Microsoft.Sdc.Common.tasks (40,21 kb)