如何仅在TFS上有条件地在我的解决方案中构建项目?

时间:2022-09-11 16:31:29

I'm using the JFrog plugin to Visual Studio 2013 with TFS 2015. This plugin is a template for publishing NuGet packages on TFS builds. Automated vNext Builds on TFS work very well with Artifactory and publish my NuGet packages to our Artifactory instance. When I build locally, I do not want the Artifactory project to build, because I do not want to publish every time I build in Visual Studio. Is there a way to make sure the solution doesn't build the project locally, but does build when the solution is used in TFS builds?

我正在使用带有TFS 2015的Visual Studio 2013的JFrog插件。此插件是用于在TFS构建上发布NuGet包的模板。自动vNext在TFS上构建可以很好地与Artifactory一起工作,并将我的NuGet包发布到我们的Artifactory实例。当我在本地构建时,我不希望构建Artifactory项目,因为我不想每次在Visual Studio中构建时都要发布。有没有办法确保解决方案不在本地构建项目,但是在TFS构建中使用解决方案时是否构建?

1 个解决方案

#1


0  

You can create a solution configuration with the Artifactory project uncheck and use this configuration to build locally. And in TFS build use the configuration with the Artifactory project checked to build the solution. Refer to this link for details: How to: Exclude Projects from a Build

您可以取消选中Artifactory项目来创建解决方案配置,并使用此配置在本地构建。在TFS构建中,使用选中Artifactory项目的配置来构建解决方案。有关详细信息,请参阅此链接:如何:从构建中排除项目

#1


0  

You can create a solution configuration with the Artifactory project uncheck and use this configuration to build locally. And in TFS build use the configuration with the Artifactory project checked to build the solution. Refer to this link for details: How to: Exclude Projects from a Build

您可以取消选中Artifactory项目来创建解决方案配置,并使用此配置在本地构建。在TFS构建中,使用选中Artifactory项目的配置来构建解决方案。有关详细信息,请参阅此链接:如何:从构建中排除项目