https://github.com/xt0rted/dotnet-startup-projects
A dotnet tool to manage multiple Visual Studio startup projects for a solution
https://github.com/xt0rted/dotnet-startup-projects
dotnet dotnet-tool dotnet-tools visual-studio
Last synced: 5 months ago
JSON representation
A dotnet tool to manage multiple Visual Studio startup projects for a solution
- Host: GitHub
- URL: https://github.com/xt0rted/dotnet-startup-projects
- Owner: xt0rted
- License: mit
- Created: 2022-10-17T03:03:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-29T03:51:54.000Z (about 2 years ago)
- Last Synced: 2024-05-01T21:50:02.931Z (about 2 years ago)
- Topics: dotnet, dotnet-tool, dotnet-tools, visual-studio
- Language: C#
- Homepage:
- Size: 244 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
#
dotnet-startup-projects
[](https://github.com/xt0rted/dotnet-startup-projects/actions/workflows/ci.yml)
[](https://www.nuget.org/packages/startup-projects)
[](https://nuget.pkg.github.com/xt0rted/index.json)
[](LICENSE)
A `dotnet` tool to manage multiple Visual Studio startup projects for a solution.
## Installation
This tool can be installed globally:
```console
dotnet tool install startup-projects --global
```
Or locally:
```console
dotnet new tool-manifest
dotnet tool install startup-projects
```
Only projects with a `` 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.
## Options
Name | Description
-- | --
`--version` | Show version information
`--help` | Show help and usage information
## Arguments
Name | Description
-- | --
`` | 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:
```console
dotnet startup-projects list
```
Set the startup projects for the current solution:
```console
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:
```json
{
"scripts": {
"startup": "dotnet startup-projects --vs 2022 --yes"
}
}
```
> **Note**: This requires [`run-script`](https://github.com/xt0rted/dotnet-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.