Nuget repository per branch with TFS

你说的曾经没有我的故事 提交于 2019-12-03 03:46:31

You'll have to do some trickery...

  • Have a different feed per branch. An easy way to set up multiple feeds is www.myget.org
  • Enable NuGet package restore in the solutions you want to enroll in this behaviour
  • In the solution's .nuget\nuget.config file, add the following:
<configuration>
  <packageSources>
    <add key="Branch X packages" value="http://www.myget.org/F/corpxyzbranchxyz" />
  </packageSources>
  <disabledPackageSources />
  <activePackageSource>
    <add key="Branch X packages" value="http://www.myget.org/F/corpxyzbranchxyz" />
  </activePackageSource>
</configuration>

This does mean that you'll have to have a different nuget.config file per branch and that you should be careful when merging/branching.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!