dotnet sln: support for custom configurations
See original GitHub issueAt the moment (3.0.100-preview6) the dotnet sln
command only supports adding, removing and listing projects. However it is not possible to change the build configurations, so that has to be done either manually or using e.g. Visual Studio.
It would be nice if you could add and remove configurations from the solution file.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:10 (4 by maintainers)
Top Results From Across the Web
How to create a project configuration based on release?
I am trying to add a configuration which can perform some customization (custom propertys, build tasks, and so on). Copy. <Configurations>Debug; ...
Read more >dotnet sln command - .NET CLI
The dotnet sln command provides a convenient way to list and modify projects in a solution file. Create a solution file. To use...
Read more >Add Build Configuration Programmatically for a .sln
Q1: I would like to ask if there is a way to add build configurations for a C# Solution programmatically? I was able...
Read more >dotnet add project wrong configuration
Everything looks fine a configuration for Debug and Release is added. If i try the same with the .NET Core-CLI: dotnet sln ClassLibrary1.sln...
Read more >Manage .NET (C#) solutions, projects, and files
On the other hand, C# code is normally organized in projects and solutions, with corresponding configuration files (.csproj and .sln).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think that’s a pretty good feature for the community, although the UX might be pretty complex for full fidelity with VS. I think we’d have to design the UX before a first time contributor would be able to run with it.
At a bare minimum, two commands would be needed. One to create a new solution config that maps to any existing project configuration of the same name and platform. If one doesn’t exist for a project, we’d have to use the same fallback logic VS uses (I forgot off the top of my head if it’s just “first project config / first project platform” or there’s some other logic involved). Another command would be needed to remove the solution configuration and related mappings.
We might also need two more commands that correlate to adding/removing project configurations and platforms (confusingly, this would operate on the solution file and not the project file, but we would need the path to the project file as input to resolve the project to modify in the solution file).
An additional command could be implemented that takes a solution configuration name, a path to a project, and a new project config / platform to map the solution configuration to. That should give enough of the editing experience one gets in VS.
I’m going to mark this “help wanted”, but leave off the “good first issue” label for now.
@KathleenDollard can we work together to figure out what these commands should look like?