Skip to main content

.NET Commands

Commands for managing .NET projects.

note

All .NET commands require an open pull request. ๐Ÿ”’


add projectโ€‹

Adds a project to the solution file. Only applicable to .NET projects.

Usage:

@gstraccini add project <projectPath>

Parameters:

ParameterRequiredDescription
projectPathโœ…The path to the .csproj file to add to the solution

Example:

@gstraccini add project src/MyProject/MyProject.csproj

bump version ๐Ÿงชโ€‹

Bumps the .NET version in .csproj files.

Usage:

@gstraccini bump version <version> [project]

Parameters:

ParameterRequiredDescription
versionโœ…The .NET version to set (e.g., net8.0, net9.0)
projectโŒThe .csproj file to update. Omitting this runs the command on all .csproj files in the repository/branch

Examples:

@gstraccini bump version net9.0
@gstraccini bump version net9.0 src/MyProject/MyProject.csproj
info

This command is currently in development and may not be fully stable.


csharpierโ€‹

Formats C# code using CSharpier. Only applicable to .NET projects.

Usage:

@gstraccini csharpier

dotnet centralised package converterโ€‹

Converts projects to use centralized package management using central-pkg-converter. Only applicable to .NET projects.

Usage:

@gstraccini dotnet centralised package converter [autofix true|false]

Parameters:

ParameterRequiredDescription
autofixโŒWhether to automatically fix and apply the changes (true or false). Defaults to false

Examples:

@gstraccini dotnet centralised package converter
@gstraccini dotnet centralised package converter autofix true

dotnet slnxโ€‹

Migrates .sln files to the newer .slnx format using dotnet sln migrate. Only applicable to .NET projects.

Usage:

@gstraccini dotnet slnx

fix csproj ๐Ÿงชโ€‹

Updates the .csproj file with the packages.config version of NuGet packages. Only applicable to .NET Framework projects.

Usage:

@gstraccini fix csproj
info

This command is currently in development and may not be fully stable.


nuget check updatesโ€‹

Checks for NuGet package updates using dotnet-outdated. Only applicable to .NET projects.

Usage:

@gstraccini nuget check updates [filter]

Parameters:

ParameterRequiredDescription
filterโŒFilter to specific packages by name

Examples:

@gstraccini nuget check updates
@gstraccini nuget check updates Newtonsoft.Json