6

Build started 16/11/2011 9:24:11 AM. Project "C:\Builds\1\NetTellerMigration\NetTellerMigrationBuild\Sources\blah.sln" on node 1 (default targets). ValidateSolutionConfiguration: Building solution configuration "Development|Default". MSBUILD : warning MSB4078: The project file "blah\blah.dtproj" is not supported by MSBuild and cannot be built. [C:\Builds\1\NetTellerMigration\NetTellerMigrationBuild\Sources\blah.sln] Done Building Project "C:\Builds\1\NetTellerMigration\NetTellerMigrationBuild\Sources\blah.sln" (default targets).

Build succeeded.

"C:\Builds\1\NetTellerMigration\blahBuild\Sources\blah.sln" (default target) (1) -> (blah_b target) -> MSBUILD : warning MSB4078: The project file "blah\blah.dtproj" is not supported by MSBuild and cannot be built. [C:\Builds\1\NetTellerMigration\NetTellerMigrationBuild\Sources\blah.sln]

1 Warning(s)
0 Error(s)

Time Elapsed 00:00:00.42

I currently have tfs2010 installed with SqlExpress and im trying 'unsucessfully' to implement continuous-integration against a SSIS package. My aim is to create a build triggered by a code checkin. I have a build definition to doso but the warning shown above is displayed and no '.dtsx' files are copied to the build directory?

I believe its something to do with the build agent targeting v4 of the .net framework but I could be wrong. Anyway, any help would be much appreciated from anyone who has experience this problem before.

Christo
  • 2,330
  • 3
  • 24
  • 37

2 Answers2

6

MSBuild can't build SSIS projects (.dtproj) because the format of these projects is pre-VS2010. The best thing to do here is to have MSBuild shell out to the SSIS project. You can create an empty C# project to do this. Then, open the .csproj file for the new project in a text editor and set the BeforeBuild target to the following:

<Target Name="BeforeBuild">
  <!-- Build the analysis SSIS project -->
  <Exec Command="&quot;$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\@InstallDir)\devenv.exe&quot; blah\blah.dtproj /Build" />
</Target>

Adjust the blah/blah.dtproj path for your project. This will run the VS2008 version of devenv to build the SSIS project.

Below is a sample of what the whole .csproj file might look like:

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0" DefaultTargets="Build">
   <PropertyGroup>
      <OutputPath>Bin</OutputPath>
   </PropertyGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="BeforeBuild">
      <!-- Build the analysis SSIS project -->
      <Exec Command="&quot;$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\@InstallDir)\devenv.exe&quot; blah\blah.dtproj /Build" />
  </Target>
</Project>
Brent M. Spell
  • 2,257
  • 22
  • 14
  • bit of a hack. im trying to integrate a CI build and this wouldnt work if I did this. There must be a more elegant way? – Christo Nov 17 '11 at 01:23
  • I agree, but I don't think there's another way. The TFS build agent only works with MSBuild scripts. I assume that the project files in the next version of BIDS will work with MSBuild. You might take a look at the latest CTP of SQL Server 2012. – Brent M. Spell Nov 17 '11 at 02:59
  • ok thanks Brent. had a quick look at 2012 CTP but nothing detailed in the feature spec regarding this specific issue. Can only presume its been address. Thanks again. – Christo Nov 17 '11 at 05:38
  • After hours spent trying to find a alternative resolution im ready to agree that there really isnt any other way! :) I havent actually got vs 2008 installed on the tfs server, do you know if there is an alternative approach to this as we are short on 2008 licences. is there a slimmed down redistributable that exposes enough to use devenv to only create a build rather than creating a full install. hope that makes sense. thanks again for you help Brent. – Christo Nov 25 '11 at 00:27
  • If you have a SQL Server license (dev edition), you can install that. It comes with enough of VS 2008 to build the SSIS project. – Brent M. Spell Nov 25 '11 at 03:05
  • could i install sql 2005 express and install the following toolkit? http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=19413 – Christo Nov 25 '11 at 04:57
  • That toolkit includes BIDS, so that should be all you need. – Brent M. Spell Nov 25 '11 at 14:46
0

I had to slightly tweek my target to get it working:

<Target Name="BeforeBuild">
<!-- Build the analysis SSIS project -->
<Exec Command="&quot;$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\@InstallDir)devenv.exe&quot; &quot;$(SolutionPath)&quot; /Build &quot;Release|Any CPU&quot; /project projectFileName.dtproj" />
</Target>
ansariwn
  • 501
  • 4
  • 13