如何使用 TFS Build 2008 和我的 Web 部署项目?

发布于 2024-08-02 09:41:26 字数 180 浏览 3 评论 0原文

我希望为我的解决方案创建 TFS 构建。无论如何,我可以只进行 TFS 构建,仅构建我的 WDP ..而不是解决方案中的所有内容,等等?

其次,是否有一个特殊的关键字可以用来告诉我的 WDP,当它是 TFSBuild 时,它将输出/放置目录设置为“XXX”,而不是当前硬编码的输出目录“zzzzzz”?

谢谢 :)

I wish to create a TFS Build for my solution. Is there anyway I can just make the TFS Build, build my WDP only .. and not everything in the solution, etc?

Secondly, is there a special keyword I can use to tell my WDP that when it's a TFSBuild, it sets the ouput/drop directory to 'XXX' instead of the current hardocded output directory of 'zzzzzz'?

thanks :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦屿孤独相伴 2024-08-09 09:41:26

TeamBuild 将构建解决方案中的所有内容。如果你想要构建更少的东西,那么就给它一个包含更少项目的解决方案。但如果您使用的是项目参考;您至少需要所有具有这些功能的项目。源代码管理下的解决方案文件应该是您希望 TeamBuild 使用的解决方案文件。您可以拥有任意数量的供个人使用,但不需要对它们进行源代码控制。

如果您使用 TeamBuild,我不会使用 Web 部署项目。 TeamBuild 替换部署项目。您可以将生成后任务插入到 msbuild 脚本中,以将文件复制到测试环境。

编辑:

<Target Name="AfterDropBuild">
    <!-- Copy output assemblies -->
    <Message Text="SiteFilesToPublish location is $(DropLocation)\$(BuildNumber)" Importance="Low" />

    <CreateItem Include="$(DropLocation)\$(BuildNumber)\Default\_PublishedWebsites\IC.Web\**\*.*" Exclude="*.pdb" >
        <Output ItemName="SiteFiles" TaskParameter="Include" />
    </CreateItem>

    <Copy
      SourceFiles="@(SiteFiles)"
      DestinationFiles="@(SiteFiles ->'\\genweb.lab.dev\Test Lab\Independence Compliance\%(RecursiveDir)%(Filename)%(Extension)')"
      ContinueOnError="true" />
</Target>

TeamBuild will build everything in the solution. If you want less things built, then give it a solution with less projects in it. But if you are using project references; you need at least all the projects that have those. The solution file under source control should be the one you want TeamBuild to use. You can have as many as you want for your own personal use, but those don't need to be source controlled.

I wouldn't use a Web Deployment Project if you are using TeamBuild. TeamBuild replaces the deployment project. You insert a post build task into the msbuild script to copy the files to your test environment.

EDIT:

<Target Name="AfterDropBuild">
    <!-- Copy output assemblies -->
    <Message Text="SiteFilesToPublish location is $(DropLocation)\$(BuildNumber)" Importance="Low" />

    <CreateItem Include="$(DropLocation)\$(BuildNumber)\Default\_PublishedWebsites\IC.Web\**\*.*" Exclude="*.pdb" >
        <Output ItemName="SiteFiles" TaskParameter="Include" />
    </CreateItem>

    <Copy
      SourceFiles="@(SiteFiles)"
      DestinationFiles="@(SiteFiles ->'\\genweb.lab.dev\Test Lab\Independence Compliance\%(RecursiveDir)%(Filename)%(Extension)')"
      ContinueOnError="true" />
</Target>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文