Skip to content

CLI to switch between PackageReference and ProjectReferece

License

Notifications You must be signed in to change notification settings

KsWare/PackageReferenceSwitcher

Repository files navigation

PackageReferenceSwitcher

CLI for switching between PackageReference and ProjectReference in project files.

Unlike other solutions, we use a permanent configuration.
Switching is done by selecting Debug/Release configuration.

PackageReferenceSwitcher prepares the solution and the projects for this.

Usage

  • Add the package projects to the solution (search in folders will be added later)
  • call PackageReferenceSwitcher init "Path-To-Your-Solution.sln"

uninstall:

  • call PackageReferenceSwitcher remove "Path-To-Your-Solution.sln"

Additional

Add as external tool and use init "$(SolutionDir)$(SolutionFileName)" as arguments.

To keep the packet versions up-to-date, use our tool 'UpdatePackageReferences'

Example

before:

  <ItemGroup>
    <PackageReference Include="KsWare.VsFileEditor" Version ="0.1.0" />
  </ItemGroup>

after init:

  <ItemGroup>
    <PackageReference Include="KsWare.VsFileEditor" Version="0.1.0" Condition="'$(Configuration)' == 'Release'" />
    <ProjectReference Include="..\..\..\VsFileEditor\src\VsFileEditor\VsFileEditor.csproj" Condition="'$(Configuration)' == 'Debug'" />
  </ItemGroup>

Other solutions

choose the one that suits you best

About

CLI to switch between PackageReference and ProjectReferece

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages