Net4x.NuGetUtility
1.0.17
dotnet add package Net4x.NuGetUtility --version 1.0.17
NuGet\Install-Package Net4x.NuGetUtility -Version 1.0.17
<PackageReference Include="Net4x.NuGetUtility" Version="1.0.17" />
<PackageVersion Include="Net4x.NuGetUtility" Version="1.0.17" />
<PackageReference Include="Net4x.NuGetUtility" />
paket add Net4x.NuGetUtility --version 1.0.17
#r "nuget: Net4x.NuGetUtility, 1.0.17"
#:package Net4x.NuGetUtility@1.0.17
#addin nuget:?package=Net4x.NuGetUtility&version=1.0.17
#tool nuget:?package=Net4x.NuGetUtility&version=1.0.17
NuGetUtility
NuGetUtility is a collection of tools and libraries to simplify working with NuGet packages and Visual Studio solution/project conversions. It contains utilities for finding and manipulating solutions, analyzing build order, converting old-style csproj/solution formats, packaging and uploading NuGet packages, and a set of helper libraries.
Included projects
NuGetUtility� CLI tools for working with solutions and packages (targets .NET 8)NugetUtility.Library� reusable helpers for NuGet operationsCleanCache� theNet4x.CleanCachepackage: what a solution references instead ofNet4x.NuGetUtilityonce NuGetUtility has prepared it � it takes NuGetUtility's per-build hooks back out, keeps the version chain, and purges the stale packages and the NuGet cacheProject2015To2017.*� tools and libraries to migrate older Visual Studio projects/solutions to newer SDK-style formatsSolutionsLibrary� utilities for analyzing solutions, build order and moving projectsUploadPackages� sample/tooling for creating and uploading NuGet packagesasyncbridgeand other helper libraries � compatibility shims used by older targets
Key features
- Parse and analyze Visual Studio solutions and project dependencies
- Migrate legacy csproj and .sln files toward modern SDK-style projects
- Create and upload NuGet packages programmatically
- Helpers for build ordering and solution manipulation
Requirements
- .NET SDK (recommended 8.0) for building the modern projects
- Compatible runtimes for legacy targets (some libraries target .NET Framework 4.6.1 / 4.5 and .NET Standard 2.0)
Build
From the repository root:
Restore and build with the .NET SDK:
dotnet restore dotnet build -c Release
Some older projects target .NET Framework. Use Visual Studio/MSBuild if you need to build those specific targets.
Net4x.CleanCache
Net4x.NuGetUtility prepares a solution: SDK-style projects, package versions factored out into
Directory.NuGet.props, project files referencing them as MSBuild properties. That preparation is durable � but
the tool redoes all of it on every build of every project, which on a large solution is most of the build.
Net4x.CleanCache is what you reference once the solution is prepared. Build once with it and it:
- removes the
Net4x.NuGetUtilityPackageReference and theNuGet.Utility.props/.targetsimports from the project and from theDirectory.Build.Props/Directory.Build.Targetsbeside it, deleting those files when NuGetUtility's seed is all they hold; - puts a single
Net4x.CleanCachereference in the solution'sDirectory.Build.props, covering every project; - keeps
Version=$(VersionPrefix).$(VersionSuffix)and the packaging defaults, so packages come out the same; - after each build removes
$(PackageOutputPath)$(PackageId).*.nupkg/.snupkg� only where the wildcard is a version, so a sibling package whose id extends this one keeps its output � and afterPackdeletes$(NuGetPackageRoot)$(PackageId), the copy restore extracted into the cache.
From then on the removal is skipped without launching anything, and only the two cleanups run.
<PackageReference Include="Net4x.CleanCache" Version="1.0.0" PrivateAssets="All" />
To prepare again � a new project, a package reference added with a literal version � re-add the
Net4x.NuGetUtility reference and build once; the preparation runs, and CleanCache unhooks it again at the end of
the same build. Switches: DontUnprepareNuGetUtility, DontCleanCache, DontPutSuffix. The executable can also
be run by hand: CleanCache.exe -Delete:true "<glob or directory>" ... or
CleanCache.exe -Unprepare:true -ProjectPath:"<csproj>" -SolutionPath:"<sln>".
Usage
Each tool or library typically exposes a small CLI or public API. Example CLI invocations are available in the respective project folders (see Source/ and CsprojToVs2017/ for examples). For package upload configuration review Source/NuGetUtility/ and the UploadPackages project.
Contributing
Contributions are welcome. Please open issues or pull requests with clear descriptions and targeted changes. Run tests and ensure builds succeed for the intended target frameworks.
License
This project is licensed under the Apache-2.0 license. See the LICENSE.txt file for details.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Net4x.NuGetUtility:
| Package | Downloads |
|---|---|
|
ProjectsLibrary
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.17 | 92 | 9/20/2026 |
| 1.0.16 | 93 | 9/19/2026 |
| 1.0.15 | 111 | 9/10/2026 |
| 1.0.14 | 106 | 9/5/2026 |
| 1.0.13 | 138 | 7/30/2026 |
| 1.0.12 | 110 | 7/30/2026 |
| 1.0.10 | 115 | 7/26/2026 |
| 1.0.9 | 125 | 7/22/2026 |
| 1.0.8 | 317 | 2/2/2026 |
| 1.0.7 | 147 | 12/30/2025 |
| 1.0.6 | 212 | 12/26/2025 |
| 1.0.5 | 223 | 12/22/2025 |
| 1.0.4 | 151 | 12/13/2025 |
| 1.0.3 | 296 | 6/8/2025 |
| 1.0.2 | 154 | 5/31/2025 |
| 1.0.1 | 145 | 5/31/2025 |
| 1.0.0 | 271 | 3/31/2025 |