Azure DevOps, Scrum, & .NET Software Leadership and Consulting Services

Free course! Predicting the Future, Estimating, and Running Your Projects with Flow Metrics

.NET Core Solution & Project Utilities (slnutil)


Last week I launched the azdoutil Azure DevOps utilities collection. Today, here’s another bunch of utilities. This time it’s my collection of utilities for working with .NET Core Solutions and Project.

I hope you find them useful.

-Ben

Got ideas for utilities you’d like to see? Found a bug? Let us know by submitting an issue https://github.com/benday-inc/slnutil/issues. Want to contribute? Submit a pull request.

Installing

The slnutil is distributed as a .NET Core Tool via NuGet. To install it go to the command prompt and type
dotnet tool install slnutil -g

Prerequisites

  • You’ll need to install .NET Core 7 from https://dotnet.microsoft.com/

Commands

Command NameDescription
renameBulk rename for files and folders.
clean referencesSimplifies package references in a C# project file. Mostly this fixes stuff in the EF Core references that breaks Azure DevOps & GitHub builds like PrivateAssets and IncludeAssets directives.
dev tree cleanClean development folder tree. Removes node_modules, .git, bin, obj, and TestResults folders.
find solutionsFind solution files in a folder tree.
get connection stringGet database connection string in appsettings.json.
replace tokenReplace token in file.
set connection stringSet database connection string in appsettings.json.
set json valueSet a string value in a json file.
list solution projectsGets list of projects in a solution.
base64Encodes a string value as a base 64 string.
validate connection stringValidate that specified connection string can connect to SQL Server.

SUBSCRIBE TO THE BLOG


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.