Raj
Raj

Reputation: 502

Error while building SSIS project using MSBuild during CI/CD implementation

Can someone assist with the following error which i am getting while building SSIS project using msbuild. I am having Visual studio 2015 in the machine. Using MSBuild 14.0 "*

error MSB4041: Th e default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 200 3 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the proje ct has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.

*" I have gone through some articles online but couldn't find solution with this scenario.

Upvotes: 0

Views: 727

Answers (1)

LoLance
LoLance

Reputation: 28116

*" I have gone through some articles online but couldn't find solution with this scenario.

I'm afraid the answer is negative. For now this scenario(build SSIS project using msbuild) is not supported.

Someone has post this issue in DC forum, see Support SSIS, SSRS, SSAS in MSBuild. So if you're trying to use azure devops for CI/CD process, please vote and track this issue to get notifications when there's any update. And if you're using other tools for CI/CD process, I suggest you open a new feature request to support SSIS building for stand-alone msbuild tools in local machine.

And here're two workarounds which may help:

1.Since you have VS2015 installed, instead of msbuild command, you can try using devenv command.

For VS2015, we can find devenv.exe and devenv.com in path C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE. Both devenv.exe and devenv.com works for this, but note: Using devenv.exe directly prevents output from appearing on the console.

So devenv.xxx ... xxx.dtproj /build can work to build the SSIS project.

2.We can find binary(Microsoft.SqlServer.IntegrationServices.Build.dll) of the SQL Server Data Tools in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE. Then we can use msbuild UsingTask element to call the tasks defined in that assembly.

The core is to call DeploymentFileCompilerTask task for SSIS build in our custom msbuild target after defining this statement:

<UsingTask TaskName="DeploymentFileCompilerTask" AssemblyFile="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.SqlServer.IntegrationServices.Build.dll" />

More details please refer to here and here.

Update:

If we have several Database projects and SSIS projects in same solution. Using command like devenv.com xx.dtproj directly will actually build all projects.

So I suggest we use command in this way:

  1. Open Developer command prompt for VS
  2. cd to solution directory
  3. use command: devenv.com SolutionName.sln /Build Development /Project SolutionName\xxx.dtproj /ProjectConfig Development

This will only build the SSIS project actually.

In addition: If you see the message The project 'DatabaseProjectName.sqlproj' will close once model building has paused. If it doesn't affect your build, just ignore it. After my check if won't actually build Database project(the output of database project is empty) if we use command above.

Upvotes: 2

Related Questions