RicoSuter/DNT

dnt switch-to-packages doesn't restore recursive

Open

#42 创建于 2019年5月10日

在 GitHub 查看
 (7 评论) (0 反应) (0 负责人)C# (74 fork)github user discovery
help wanted

仓库指标

Star
 (470 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Following setup:

  • CommonA -- CommonA.sln -- CommonA --- CommonA.csproj
  • CommonB -- CommonB.sln -- CommonB --- CommonB.csproj
  • ConsumcerC -- ConsumerC.sln (includes currently only ConsumerC.csproj) -- ConsumerC --- ConsumerC.csproj

CommonB references CommonA via nuget ConsumerC references CommonA and CommonB via nuget

Created switcher.json for ConsumerC to replace CommonA and CommonB

{
    "solution": ConsumerC.sln,
    "mappings": {
    "CommonA": "../CommonA/CommonA.csproj",
    "CommonB": "../CommonB/CommonB.csproj"
    }
}

dnt switch-to-project switcher.json

nuget References get switched recursively to project references. CommonB references CommonA as a project reference! ConsumerC.csproj references CommonA and CommonB as a project reference! ConsumerC.sln contains CommonA and CommonB + ConsumerC

dnt switch-to-packages switcher.json

Package references get switched back for ConsumerC.csproj, ConsumerC.sln contains only ConsumerC.csproj. Correct so far. But CommonB.csproj still contains the project reference to CommonA.csproj.

DNT (DotNetTools, https://github.com/RSuter/DNT, v1.2.2.0)

贡献者指南