KsWare.PackageReferenceSwitcher 0.1.0

dotnet add package KsWare.PackageReferenceSwitcher --version 0.1.0                
NuGet\Install-Package KsWare.PackageReferenceSwitcher -Version 0.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="KsWare.PackageReferenceSwitcher" Version="0.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add KsWare.PackageReferenceSwitcher --version 0.1.0                
#r "nuget: KsWare.PackageReferenceSwitcher, 0.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install KsWare.PackageReferenceSwitcher as a Cake Addin
#addin nuget:?package=KsWare.PackageReferenceSwitcher&version=0.1.0

// Install KsWare.PackageReferenceSwitcher as a Cake Tool
#tool nuget:?package=KsWare.PackageReferenceSwitcher&version=0.1.0                

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

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.0 110 9/17/2024