ctlajoie / DupSelection

A Visual Studio extension that adds a command for duplicating the current selection (or line).
https://marketplace.visualstudio.com/items?itemName=ctlajoie.DuplicateSelection
MIT License
47 stars 12 forks source link

Visual Studio 2022 #19

Open urlloader opened 2 years ago

urlloader commented 2 years ago

Hi, any change we can get this extension to support visual studio 2022?

onolox commented 2 years ago

It's really needed.

ctlajoie commented 2 years ago

New versions of Visual Studio now have an Edit.Duplicate command, that to my understanding does very much the same thing as my extension. Is there a reason you prefer this extension?

onolox commented 2 years ago

If I have a selection like this: 182042743-40a4bf8f-65e6-4026-a581-68aa22c16497

Your plugin duplicate the entire 3 lines. The VS command only duplicates the selection. Other plugins do the same as the VS. Because of this your plugin is still needed.

ctlajoie commented 2 years ago

I will look into building this for VS2022

ctlajoie commented 2 years ago

I was able to get the extension to build for VS2022 but something isn't working quite right. The extension installs into VS2022 with no errors. Binding the extension to a keyboard shortcut also works. However it throws an error when I invoke the command. This might be an easy fix, but considering the functionality provided by this extension is for the most part already available in newer versions of VS, I would prefer not to spend more time on it.

I pushed my code changes to a branch named vs2022. If someone else wants to have a crack at it and submit a PR, I would be happy to accept it and publish a new version if everything works. Keep in mind that the extension must continue to work for older VS versions.