Nuget repository per branch with TFS

前端 未结 1 576
小鲜肉
小鲜肉 2021-02-06 12:40

I have a TFS environment with the following branching setup

  • Dev - Primary working branch for developers
  • Main - Stable, releasable branch
  • Hotfix -
相关标签:
1条回答
  • 2021-02-06 13:37

    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.

    0 讨论(0)
提交回复
热议问题