0

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.

Raj
  • 462
  • 3
  • 15
  • That's not a supported scenario for VS2015+msbuild14.0. You may try using `devenv.com xx.dtproj /build` command or you have to write a custom script like [this](https://speaksql.wordpress.com/2013/06/07/a-journey-to-db-deployment-automaton-ssis-build-using-msbuild/). – LoLance Nov 12 '19 at 06:23
  • @LanceLi-MSFT - This is great and i am able to build with devenv.com. The only issues I see is its building my dacpac as well ??. I have one solution in which i have one DB proj and one ETL proj. I am giving path specific to ETL proj still its building my Database proj – Raj Nov 12 '19 at 07:14
  • It seems that for SSIS projects, we'd better use [this format](https://learn.microsoft.com/en-us/visualstudio/ide/reference/build-devenv-exe?view=vs-2019#example), see similar format [here](https://stackoverflow.com/questions/16920476/build-dtproj-ssis-on-the-build-server-with-devenv-exe-visual-studio-2012). And that strange behavior still occurs and affects your build process, I suggest you post this issue in [DC forum](https://developercommunity.visualstudio.com/spaces/8/index.html). I assume this could be one issue about SSIS tool. Let me know if my answer helps :) – LoLance Nov 12 '19 at 08:17
  • Thanks @LanceLi-MSFT . I am going to spend some more time with the details provided. I will mark the Answer based on that. Thanks so much for your comments. – Raj Nov 12 '19 at 08:39
  • Glad to know it makes some help, any update feel free to contact me:-) – LoLance Nov 12 '19 at 08:39

1 Answers1

2

*" 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.

LoLance
  • 25,666
  • 1
  • 39
  • 73
  • 1
    I was able to automate everything and it wouldn't have been possible without the info given by you. I have used devenv.com for building the ssis and ISDeploymentWizard.exe for deployment. – Raj Nov 13 '19 at 06:17