编译SSIS项目团队市 [英] Compiling SSIS Projects with Team City

查看:161
本文介绍了编译SSIS项目团队市的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人这样做呢?如果是这样,你用什么工具/技术/方法?

Has anyone done this? If so, what tools/techniques/approaches did you use?

是否有可能做安装Visual Studio的SQL Business Studio的版本?

Is it possible to do with installing the SQL Business Studio Version of Visual Studio?

在此先感谢!

推荐答案

明白了人...

1)安装的MSBuild扩展

1) Install MSBuild Extensions

2)创建一个build.xml文件如此...

2) Created a Build.Xml file as so...

<Project ToolsVersion="3.5" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\ExtensionPack\MSBuild.ExtensionPack.tasks"/>
<Target Name="Default">
    <PropertyGroup>
        <OutputRoot>../../../build-artifacts</OutputRoot>
    </PropertyGroup>
    <ItemGroup>
        <SSISProjectFile Include="SSISProject.dtproj"/>
        <SSISProject Include="@(SSISProjectFile)">
            <OutputDirectory>$(OutputRoot)</OutputDirectory>
        </SSISProject>      
    </ItemGroup>
    <ItemGroup>
        <Namespaces Include="Mynamespace">
            <Prefix>DTS</Prefix>
            <Uri>www.microsoft.com/SqlServer/Dts</Uri>
        </Namespaces>
    </ItemGroup>

    <MSBuild.ExtensionPack.Xml.XmlFile 
        TaskAction="UpdateElement" 
        File="EnclarityDataImport.dtsx" 
        XPath="//DTS:Property[@DTS:Name='ConfigurationString']" 
        InnerText="$(MSBuildProjectDirectory)\EnclarityDataImport.dtsConfig"
        Namespaces="@(Namespaces)"/>
    <MSBuild.ExtensionPack.SqlServer.BuildDeploymentManifest InputProject="@(SSISProject)"/>
</Target>

唯一的技巧在这里构建的最后一部分。默认情况下Visual Studio中增加的绝对路径,以你的配置和连接字符串的文件为您DTSX包。团队市将结合使用这些具有扩展的MSBuild建立包​​,以便本地路径将打破建立,因为在团队市构建目录的路径将自动生成。因此,使用code以上和$(MSBuildProjectDirectory),你可以在你DTSX玩弄文件路径的值,使其指向您的编译exectuing的路径。

The only trick was the last part of the build here. By default visual studio adds the absolute path to your config and connection string files for your dtsx package. Team City will use these in conjunction with MSBuild extensions to build the package so a local path will break the build because the paths to the build directories in Team City are automatically generated. So using the code above and the $(MSBuildProjectDirectory) you can twiddle the value of the path on your dtsx file so that it points to the path where your compilation is exectuing.

这篇关于编译SSIS项目团队市的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆