devlooped / devlooped/dotnet-vs

Allow saving the default VS to use for a specific directory and its descendents

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
50
Forks
9
PR merge metrics
No merged PRs in 30d

Description

We made it possible to select a default VS to run when vs run (or simply vs) is used.

It's not unusual to work on various solutions/repository roots with different versions of VS: for example, the main extension you work on always runs VS preview, while your OSS projects always use VS stable.

Proposal:

vs [run] +default=.

So the default flag instead of being a "plain" boolean like before (we had --default to set the default and --default- to remove the default) it would be a boolean parsed with + (to enable) and - to disable (just like the proposed syntax for modify) and the optional value would be the directory where to store the preference.

If a directory is not set (or . to denote current directory), the existing logic in dotnet-file to look up from the current directory until a .netconfig is found, or go to user profile would be used.

Given #10, it would now be possible to change the default VS for any folder and its descendents, since dotnet-file options reading will automatically probe for parent directories when looking for the devenv preference.

Back this issue
Back this issue

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the existing default Visual Studio selection used by vs run or vs, then review how dotnet-file locates the devenv preference through parent directories and the user profile. Implement the proposed +default and -default forms with an optional directory value, and verify that directory-specific defaults apply to descendants.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.