`dotnet run` can use the .slnx `DefaultStartup` property
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
### Is your feature request related to a problem?
Using `dotnet run` in a directory where there's only a solution or `dotnet run solution.slnx` currently shows an error:
> Couldn't find a project to run. Ensure a project exists in , or pass the path to the project using --project.
### Describe the solution you'd like
The .slnx format has the option to specify the startup project using ``. If there's a single one, `dotnet run` can use it to run the project.
### Alternatives you've considered
_No response_
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how `dotnet run` handles a directory containing only a solution and how it parses `.slnx` project entries. Verify the `DefaultStartup="true"` selection when exactly one project is marked, including `dotnet run solution.slnx`; done when that project runs while the existing error remains appropriate when no usable startup project is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100