question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet sln: support for custom configurations

See original GitHub issue

At 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:open
  • Created 4 years ago
  • Reactions:6
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
peterhuenecommented, Jul 1, 2019

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.

1reaction
livarcocccommented, Oct 7, 2019

@KathleenDollard can we work together to figure out what these commands should look like?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found