Business Intelligence (BI) project types will not be supported by the new version of Visual Studio 2010 (at least for some time after release). See this MSDN forum post for more information. Developers are supposed to use Visual Studio 2008 to work with these projects. It means that if you have Reporting or SSIS projects, you still need the former version of Visual Studio to build them on a build server.
Apparently, Visual Studio 2010 and 2008 will coexist in team development environment and as a consequence, continuous integration process must support both versions.
The problem is that there is no straightforward way to build solutions of different versions side by side on the same TFS build server. After you install .NET 4.0 and Visual Studio 2010 on your build server, it will be able to build only the solutions converted to this version. Attempt to build BI projects will fail.
Note: One has to distinguish between this problem and multi-targeting. Multi-targeting is all about compiling one source code for different versions of .NET Framework. Some people mistakenly mix it with compiling solutions of different versions.
The heart of TFS build server is a Windows Service called "Visual Studio Team Foundation Build". This service is responsible for launching MSBuild script. It can be configured for using particular version of MSBuild.
MSBuild from .NET 4.0 is able to compile solutions v.2010. But it does not recognize Business Intelligence projects that are supported by Visual Studio 2008. To build these projects, one needs to use MSBuild 3.5.
Unfortunately, Visual Studio Team Foundation Build service uses only one version of MSBuild. It cannot intelligently "switch" between versions depending on our needs.
However, we can employ the ability to run it in console mode. Thereby, we can have multiple instances of build service on the same machine. Every instance will use individual configuration:
- The first instance will be run as a Windows Service and listen port 9191. It will compile solutions v.2010 using MSBuild v4.0.
- The second instance will be run as a Console Application and listen port 9194. It will compile v.2008 using MSBuild v3.5.
In Visual Studio Team Explorer, these instances will be visible as a two different Build Agents. Then we can assign particular Build Agent to corresponding build definition.
Step by Step Instructions
- Go to folder: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Private Assemblies
- Find files TFSBuildService.exe and TFSBuildService.exe.config
- Create copies of these files in the same folder: TFSBuildService2.exe and TFSBuildService2.exe.config
- Open TFSBuildService.exe.config file.
<add key="MSBuildPath" value="">
<add key="MSBuildPath" value="c:\windows\microsoft.net\framework\v4.0.21006\">
- Open TFSBuildService2.exe.config file.
<add key="MSBuildPath" value="">
<add key="MSBuildPath" value="c:\windows\microsoft.net\framework\v3.5\">
<add key="InteractivePort" value="9192">
<add key="InteractivePort" value="9194">
- Now restart "Visual Studio Team Foundation Build" Windows service on build machine (go to Control Panel/Administration Tools/Services).
- Create shortcut for TFSBuildService2.exe. I would recommend to add this shortcut to Startup.
- Run TFSBuildService2.exe. You will see a console window opened. Do not close it. While it is open, your build server is being able to build solutions v2008.
- Open Visual Studio 2008, Team Explorer, right click on Builds folder in your project, select Manage Builds Agents. "Manage Build Agents" window will be opened. (Note: You should use namely VS 2008 because I did not find corresponding menu item in VS 2010 Beta 2. They will definitely fix it in release.)
- Now we have to create two build agents:
In Team Explorer, select a build that has a solution of version 2008, right click and select Edit Build Definition and then go to Build Defaults and select Agent 2008. Close the window.
In Team Explorer, select a build that has a solution of version 2010, right click and select Edit Build Definition and then go to Build Defaults and select Agent 2010. Close the window.
This article is written when Visual Studio 2010 Beta 2 was released. Information in the article can probably be subject to change when the final version will be released.
- 10.01.2010 - Article published