startup-projects 1.0.0

.NET 6.0 .NET Core 3.1
dotnet tool install --global startup-projects --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local startup-projects --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=startup-projects&version=1.0.0
nuke :add-package startup-projects --version 1.0.0

<img src="assets/icon.svg" align="left" height="45"> dotnet-startup-projects

CI build status NuGet Package GitHub Package Registry Project license

A dotnet tool to manage multiple Visual Studio startup projects for a solution.

Installation

This tool can be installed globally:

dotnet tool install startup-projects --global

Or locally:

dotnet new tool-manifest
dotnet tool install startup-projects

Only projects with a <IsDefaultMultiStartupProject> property set to true will be included in the multiple startup configuration. Since this tool doesn't use MSBuild to load the project files the property can not be set in Directory.Build.props, it must be in the project file itself.

Running this will either create a new .suo file for the solution, or overwrite the existing one. This means any settings saved in your existing .suo file will be lost. You will be prompted to confirm this before the file is overwritten.

Keeping current

Tools like Dependabot and Renovate don't currently support updating dotnet local tools. One way to automate this is to use a GitHub Actions workflow to check for updates and create PRs when new versions are available, which is what this repo does.

Options

Name Description
--version Show version information
--help Show help and usage information

Arguments

Name Description
<solution> The path to the solution file to use (defaults to the current working directory)

Commands

list

List the startup projects for the current solution.

Options

This command has no options.

set

Set the startup projects for the current solution.

Options
Name Description
-y, --yes Automatically answer yes to any prompts
-v, --vs Visual Studio versions to target (defaults to 2022)

Note: The supported Visual Studio versions are 2019 and 2022

Usage

List all projects configured to be startup projects:

dotnet startup-projects list

Set the startup projects for the current solution:

dotnet startup-projects set -v 2019 -y

It may be helpful to add a script for this to your global.json to make it easier to run:

{
  "scripts": {
    "startup": "dotnet startup-projects --vs 2022 --yes"
  }
}

Note: This requires run-script to be used in the project.

Color output

This tool supports the DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION environment variable. Setting this to 1 or true will force color output on all platforms. Due to a limitation of the Console apis this will not work on Windows when output is redirected.

There is also support for the NO_COLOR environment variable. Setting this to any value will disable color output.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp3.1
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.0 1,584 10/17/2022