twilio-labs / NgrokExtensions

Visual Studio integration with ngrok
MIT License
48 stars 26 forks source link

Initial support for VS2022 #48

Closed timheuer closed 1 year ago

timheuer commented 2 years ago

Primarily a PR for #47 but takes it a bit further with a little code style cleanup, separating to have a version for VS2019 and VS2022, using GitHub Actions for a build/artifacts.

kaleb-iskandar commented 2 years ago

@timheuer I tried your build https://github.com/timheuer/NgrokExtensions/actions/runs/1695368100 after installed on my VS 2022 Community Edition, this popup show up, image when I choose yes, this error show up, would be good if you can fix it and include it in your PR. Thanks image

timheuer commented 2 years ago

@kaleb-iskandar looks like ngrok changed their download page a bit. I'll have to take a look, but may take a bit with other things I need to get done.

timheuer commented 2 years ago

Ok, @kaleb-iskandar I worked around this quickly: https://github.com/timheuer/NgrokExtensions/actions/runs/1946282256

kaleb-iskandar commented 2 years ago

Ok, @kaleb-iskandar I worked around this quickly: https://github.com/timheuer/NgrokExtensions/actions/runs/1946282256

@timheuer now it works, Thankyou.

henda79 commented 2 years ago

Hey guys, I run in to this issue on VS2022 Enterprise.

image

Any thoughts ?

timheuer commented 2 years ago

Hey guys, I run in to this issue on VS2022 Enterprise.

Constantly hit this? Has it ever worked?

henda79 commented 2 years ago

Its the first time I'd ever used it on VS2022, I use VS2019 without any issues there, but was working on a .NET 6 project and needed 2022. Built the package and installed. Tried few times with admin elevation then just gave up.

timheuer commented 2 years ago

@henda79 I just tried mine again and can't get this error, everything works for me. Unfortunately this error is coming from the basic 'uncaught' exception handler to also not helpful, but basically it is coming from ngrok.exe itself. If you tried the command-line itself I wonder if you're able to get it working.

Swimburger commented 2 years ago

I noticed that there's a duplicate folder NgrokExt.Shared vs NgrokExtensions.Shared. I'm assuming this a copy/paste and accidental git check in :)

timheuer commented 2 years ago

@Swimburger that could have been an oversight on my part for sure! Only need one shared :-)

Swimburger commented 1 year ago

@timheuer What do we need for this PR to leave draft stage?

timheuer commented 1 year ago

@timheuer What do we need for this PR to leave draft stage?

Honestly nothing :-) -- I kept it in draft because I know the repo is in a specific state with looking for assistance/maintainer. I got the impression that a merge might be unlikely...but I'll submit it :-)

Swimburger commented 1 year ago

I was able to build the project and install it. I definitely encountered some bugs, but I also see those listed as existing issues, so they seem pre-existing.

I was able to manually test this:

Also works in VS2017.

Swimburger commented 1 year ago

I've been invited as a collaborator and will help maintain the project mostly as is.

Quick question, are Shared projects the preferred way of code sharing for VS Extensions, or is there another reason Shared projects is preferred over a class library? I don't see shared projects often :)

timheuer commented 1 year ago

Quick question, are Shared projects the preferred way of code sharing for VS Extensions, or is there another reason Shared projects is preferred over a class library? I don't see shared projects often :)

I think either or are fine actually. Shared projects don't seem to be working the same way with VSIX project types as they are with others (e.g., you can do a project-to-project reference in a classlib to a shared project as an example and it kind of acts as a source-level classlib ref and compiled into the main lib though (you can see this in a Blasor Wasm app when asp-hosted in the template).

Recalling when I did this I think I expected the shared projects to work and when they didn't just used linked files...tl;dr -- I got lazy. A classlib with a ref should work :-)

Swimburger commented 1 year ago

Look at the VS2022 upgrade guidance, they seem to recommend Shared projects too: https://learn.microsoft.com/en-us/visualstudio/extensibility/migration/update-visual-studio-extension?view=vs-2022

LGTM!

Swimburger commented 1 year ago

Extension published at https://marketplace.visualstudio.com/items?itemName=DavidProthero.ngrokextensions-2022

timheuer commented 1 year ago

Extension published at marketplace.visualstudio.com/items?itemName=DavidProthero.ngrokextensions-2022

Awesome! Thanks @Swimburger for carrying the mantle and getting it done!

Swimburger commented 1 year ago

Thank you for the PR!!!