none
Build .dtproj using MSBuild or PowerShell

    Question

  • Hi All,

    I want to build my .dtproj using MSBuild or PowerShell script.

    When I enter MSBUILD xyz.dtproj command, it gives below error

    error MSB4041: The default XML namespace of the project must be the MSBuild XML namespace.

    Is there any way to build SSIS.dtproj using MSBuild/PS, to generate .ispac file.

    Thanks,
    Harit Kalathia


    Harit K

    • Moved by ArthurZMVP Friday, November 02, 2012 2:49 PM Does not relate to SSIS (From:SQL Server Integration Services)
    • Moved by Shulei Chen Monday, November 05, 2012 2:10 AM (From:SQL Server Tools)
    Friday, November 02, 2012 2:24 PM

Answers

  • Hi,

    As you mentioned in original post, msbuild doesnot build the dtproj. You could build it with devenv.exe:

    C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe *.dtproj /Build

    The specified devenv is the Sql Server Business Intelligence Development Studio.


    Forrest Guo | MSDN Community Support | Feedback to manager

    Friday, November 09, 2012 7:02 AM
    Moderator

All replies

  • Hi Harit,

    I found a workaround:

    Set an environment variable called MSBuildEmitSolution=1 and then build the solution using msbuild. This will cause MSBuild to save a .proj file that is the msbuild project that represents the solution. You can use that solution.proj file from the command line in order to build without errors.

    More information you can refer to:

    http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/24c0a216-2109-4bab-acbc-be1084890a5d/

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

    Monday, November 05, 2012 9:32 AM
    Moderator
  • Hi Ego,

    I did following steps, but still no luck. Let me know if I have not understood your workaround

    • Created one "MSBuildEmitSolution" system variable in MyComputer.
    • Now from VS Command Prompt entered "MSBuild XYZ_SSIS.sln "
    • Above command creates XYZ_SSIS.dtproj.metaproj file
    • Now from VS command prompt entered "MSBuild XYZ_SSIS.dtproj.metaproj"
    • Above command says build succedded, but no .ispac package created.

    Further inputs on this appreciated.

    Thanks,
    Harit Kalathia


    Harit K

    Monday, November 05, 2012 1:19 PM
  • Hi Harit,

    Yes.

    However I did know how it generates .ispac package. Where you set the output path, can you find it there?

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, November 07, 2012 9:52 AM
    Moderator
  • Hi Ego,

    Where to mention outpath? In .metaproj file?

    Contents of XYZ_SSIS.dtproj.metaproj mentioned below for your reference.

    <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
      <PropertyGroup>
        <MSBuildToolsRoot>C:\Windows\Microsoft.NET\Framework\</MSBuildToolsRoot>
        <FrameworkSDKRoot>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\</FrameworkSDKRoot>
        <MSBuildRuntimeVersion>4.0.30319</MSBuildRuntimeVersion>
        <SDK40ToolsPath>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\</SDK40ToolsPath>
        <SDK35ToolsPath>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\</SDK35ToolsPath>
        <MSBuildToolsPath32>C:\Windows\Microsoft.NET\Framework\v4.0.30319\</MSBuildToolsPath32>
        <VCTargetsPath>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\</VCTargetsPath>
        <AspNetConfiguration>Debug</AspNetConfiguration>
        <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
      </PropertyGroup>
      <ItemDefinitionGroup />
      <Target Name="Build" Condition="'$(CurrentSolutionConfigurationContents)' != ''">
        <Warning Text="The project file &quot;XYZ_SSIS\XYZ_SSIS.dtproj&quot; is not supported by MSBuild and cannot be built." Code="MSB4078" HelpKeyword="MSBuild.SolutionParseUnknownProjectType" />
      </Target>
      <Target Name="Clean" Condition="'$(CurrentSolutionConfigurationContents)' != ''">
        <Warning Text="The project file &quot;XYZ_SSIS\XYZ_SSIS.dtproj&quot; is not supported by MSBuild and cannot be built." Code="MSB4078" HelpKeyword="MSBuild.SolutionParseUnknownProjectType" />
      </Target>
      <Target Name="Rebuild" Condition="'$(CurrentSolutionConfigurationContents)' != ''">
        <Warning Text="The project file &quot;XYZ_SSIS\XYZ_SSIS.dtproj&quot; is not supported by MSBuild and cannot be built." Code="MSB4078" HelpKeyword="MSBuild.SolutionParseUnknownProjectType" />
      </Target>
      <Target Name="Publish" Condition="'$(CurrentSolutionConfigurationContents)' != ''">
        <Warning Text="The project file &quot;XYZ_SSIS\XYZ_SSIS.dtproj&quot; is not supported by MSBuild and cannot be built." Code="MSB4078" HelpKeyword="MSBuild.SolutionParseUnknownProjectType" />
      </Target>
    </Project>


    Harit K

    Wednesday, November 07, 2012 12:17 PM
  • Hi Harit,

    I can't see any task in your targets but some warnings.

    If we compile your solution in Visual Studio IDE, can the .ispac package be generated well?

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, November 08, 2012 9:23 AM
    Moderator
  • Yes, if I compile my .dtproj solution in VS IDE it generated .ispac package.


    Harit K

    Thursday, November 08, 2012 9:42 AM
  • Hi Harit,

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
     
    Thank you for your understanding and support.

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

    Friday, November 09, 2012 6:31 AM
    Moderator
  • Hi,

    As you mentioned in original post, msbuild doesnot build the dtproj. You could build it with devenv.exe:

    C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe *.dtproj /Build

    The specified devenv is the Sql Server Business Intelligence Development Studio.


    Forrest Guo | MSDN Community Support | Feedback to manager

    Friday, November 09, 2012 7:02 AM
    Moderator
  • Hello

    I am new to Ispac deployment and want to use command line to generate the ispac files for my solution.

    From the above posts i could get some idea related to metaproj file but i could not find it in my solution.

    My final aim is to automate the build generation for the SSIS solution.

    Can you help me in this

    Thanks

    Puneet

    Tuesday, April 16, 2013 7:01 AM
  • Looks like you didn't follow up with suggestion I gave above. Let me know how devenv command line work for you.

    Forrest Guo | MSDN Community Support | Feedback to manager

    Tuesday, April 16, 2013 7:09 AM
    Moderator
  • Thanks Forrest for your reply

    I tried to build the solution using devenv.exe also but nothing seemed to happen i executed the above command line  and the command ended. It again gave the execution prompt and when i check if any build has been generated i cant find any obj/ bin folder or any ispac file

    Thanks

    Puneet


    [EDIT]: Just to add on i am using VS 2012 data tools for building the solution
    Tuesday, April 16, 2013 8:33 AM
  • You added important information. To build SSIS package, you need SQL Server Management Studio, this will install Business Intelligence Development Studio, which is a Visual Studio shell. Go to that context please.


    Forrest Guo | MSDN Community Support | Feedback to manager

    Tuesday, April 16, 2013 8:41 AM
    Moderator
  • I am sorry i did not get you. I have both SQL server Express edition, SSMS , SSDT 2012 installed on my system. 

    Can you please elaborate here.

    Thanks

    Puneet

    Tuesday, April 16, 2013 9:46 AM
  • Sure. People create and build SSIS package with SQL Server Business Intelligence Development Studio, right? Can you share the complete command lines and it's running directory? I can then confirm if you're with right tool.

    Forrest Guo | MSDN Community Support | Feedback to manager

    Tuesday, April 16, 2013 10:21 AM
    Moderator
  • Here is the command line that i have used: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE>devenv.exe *.dtproj /Build

    My solution is in D:/Projects

    I have run the same command line at this path too

    Tuesday, April 16, 2013 10:26 AM
  • Hello Forrest

    I tried the devenv exe and this is the error i am getting for all SSIS/ SSAS projects

    Error: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

    This seems the only blocker for me.

    Again repeating i am using VS2012 update 2 and SQL server 2012 CU3 Express edition

    Thanks

    Puneet W

    Wednesday, April 17, 2013 11:35 AM
  • No, you're not using right tool to build the SSIS package. What you need is a full version of SQL Server, this will install another version of SQL Server Data Tools. Hope this helps.

    Forrest Guo | MSDN Community Support | Feedback to manager

    Thursday, April 18, 2013 8:38 AM
    Moderator
  • Tried 

    Still not working:(

    Puneet W

    [I have logged bug with MS also for this. Bug:784983]
    Thursday, April 18, 2013 12:43 PM
  • Thanks for the feedback.

    btw, as the softwares that you use are different, I believe the solution in this thread is still valid.


    Forrest Guo | MSDN Community Support | Feedback to manager

    Thursday, April 18, 2013 11:14 PM
    Moderator
  • Hi,

    As you mentioned in original post, msbuild doesnot build the dtproj. You could build it with devenv.exe:

    C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe *.dtproj /Build

    The specified devenv is the Sql Server Business Intelligence Development Studio.


    Forrest Guo | MSDN Community Support | Feedback to manager

    This was awhile ago, but those this command still work?

    I want to do a script to build project and deploy project.

    I tried the command for devenv.exe followed by path\file.dtproj but it is complaining its an unexpected token.

    Thursday, February 22, 2018 5:16 PM