Skip to content

Conversation

czarkoff
Copy link
Contributor

@czarkoff czarkoff commented Nov 3, 2024

This allows using Visual Studio as an external tool for opening the repo in.

Current limitations:

  • Visual Studio for Mac is not supported.
  • It only relies on registry for Visual Studio location (reportedly Visual Studio can be installed without modifying the registry; other discovery mechanisms may be used).
  • SourceGit tries to open the whole repo as a directory. From my experience, when you actually need Visual Studio (as opposed to Visual Studio Code), you normally want to open a solution file instead. One may expect a prompt asking how to open a project and allowing to select a solution file interactively. Instead, the implementation tries to locate a solution file and to open it directly, falling back to repo directory only in case of failure.

The solution finding bit is more objectionable, and the implementation is messier, so it is split out into its own commit.

Basically, I've implemented specifically what I need to make use of the external tools functionality.

@czarkoff czarkoff changed the base branch from master to develop November 3, 2024 15:45
@love-linger love-linger self-assigned this Nov 4, 2024
@love-linger love-linger added the enhancement New feature or request label Nov 4, 2024
@love-linger love-linger merged commit 1d00987 into sourcegit-scm:develop Nov 4, 2024
13 checks passed
love-linger added a commit that referenced this pull request Nov 4, 2024
* rewrite `Models.ExternalTool` to use `_execArgsGenerator` instead of `OpenCmdArgs` and `ArgTransform`
* remove dependency of `System.Linq` due to AOT limitations
* since the `Visual Studio` is only available on Windows, use `TryAdd` directly.
* update `README.md`

BREAKING CHANGE: now the key in `external_editors.json` uses the same name with external tool.

Signed-off-by: leo <[email protected]>
@czarkoff czarkoff deleted the visual_studio branch November 4, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants