Paket.VisualStudio icon indicating copy to clipboard operation
Paket.VisualStudio copied to clipboard

Visual Studio 2019 Support

Open JimHume opened this issue 6 years ago • 19 comments

Description

The Paket extension will not install in Visual Studio 2019.

Repro steps

Try to install it.

Expected behavior

It should be installed.

Actual behavior

You receive a message indicating "This is already installed in all available products" and it won't install into Visual Studio 2019. It also does not appear in the Visual Studio 2019 Extensions Browser.

Known workarounds

None

Related information

  • Visual Studio 2019 (v16.0.0)

JimHume avatar Apr 03 '19 22:04 JimHume

I upgraded the manifest to support both VS2017 and VS2019. ( https://github.com/KinNeko-De/Paket.VisualStudio/ )

But I have zero experience in developing visual studio extensions.

I only was successful with manual editing the versions. The editor in visual studio added different version numbers and removed vs2017 support. I really don't know why.

I had to disable 'deploy the extension during the build process' in the project settings. I think it is because I have no vs2015 installed. I successfully build the project on another computer with vs2015. But I am not completely sure.

Also, the extension uses the synchronous API that is deprecated with vs2019. You can still use the extension. I tried to convert the package to an AsyncPackage ( https://github.com/microsoft/VSSDK-Extensibility-Samples/tree/master/AsyncPackageMigration ) but I failed. I don't know how to convert the dependencies correctly.

I hope this helps a little bit and some else can convert the plugin correctly.

KinNeko-De avatar Jun 04 '19 21:06 KinNeko-De

I know even less about Visual Studio extensions than you do. Is there some way to build your version from source and install it or some other workaround that would let us use it until the official paket extension supports 2019?

ntwilson avatar Jun 04 '19 22:06 ntwilson

I am new to Github. But I think you can clone my repository and build it with normal "build solution". I built it with vs2019 community and inside the 'bin' folder you find the installer.

KinNeko-De avatar Jun 04 '19 22:06 KinNeko-De

I forgot something. When you build the solution for the first time you will get an error that "paket restore failed with error 9009". In the ".paket" folder there is a paket.bootstrapper.exe but no paket.exe. To fix this for me i executed the paket.bootstrapper.exe one time. It will download the newest paket.exe. I dont know how they normaly build the solution :)

KinNeko-De avatar Jun 05 '19 10:06 KinNeko-De

Thank you so much!

ntwilson avatar Jun 05 '19 14:06 ntwilson

I've run into a conundrum: I use paket for my WPF project, and I want to convert my WPF project from .Net Framework to .NET Core 3. However I can't get VS2017 to work with any .Net Core 3 projects, and I can't get VS2019 to work with the Paket extension (so I would have to do everything manually via the command line).

This problem would be solved if we had an official Paket extension for VS 2019.

jwosty avatar Nov 08 '19 22:11 jwosty

so I would have to do everything manually via the command line

Unimaginable horrors

Krzysztof-Cieslak avatar Nov 08 '19 22:11 Krzysztof-Cieslak

@Krzysztof-Cieslak of course, that's not horrible in and of itself, but it's certainly nice to have it built into the VS build steps instead of having to remember to switch back and forth. Which I'm getting quite good at.

jwosty avatar Nov 09 '19 07:11 jwosty

Any update on this? It's 2020 now and Visual Studio is still not supported. :cry:

svdHero avatar Jan 16 '20 08:01 svdHero

paket is supperted in VS. It's just that no addin is needed

forki avatar Jan 16 '20 08:01 forki

@forki So no need to get this: https://marketplace.visualstudio.com/items?itemName=SteffenForkmann.PaketforVisualStudio from Marketplace?

svdHero avatar Jan 16 '20 09:01 svdHero

no it's totally ine to run paket from cmd

forki avatar Jan 16 '20 09:01 forki

Now I am confused. What exactly do you mean? Are you saying that Visual Studio 2019 will use Paket behind the scenes to build a project, but it does not offer Paket configuration via GUI? In other words, for building I can use VS, for managing packages I need to fire up an external cmd?

Just verifying that I understood correctly...

svdHero avatar Jan 16 '20 13:01 svdHero

@svdHero I don't think that there are plans to manage Paket via a VS extension any more (@forki can correct me if I'm wrong) - it's probably just too expensive to do in terms of effort. That means using the terminal that's integrated with VS (or otherwise). For me personally, this works fine, but everyone is different.

If you modify the dependencies file by hand (it's a relatively lightweight file), the only command that's generally needed is paket install. Perhaps you can configure VS to bind a hotkey to a command that runs that?

isaacabraham avatar Jan 16 '20 13:01 isaacabraham

@isaacabraham Fair enough, but if I have to do a manual paket install in a terminal, what does @forki mean by saying "Paket is supported in VS" then? How is VS 2019 using/invoking/supporting Paket in any way?

svdHero avatar Jan 16 '20 18:01 svdHero

Restore is supported without need of cmd line. It just works. This wasn't always the case. Install cmd can be done from terminal within VS

forki avatar Jan 16 '20 18:01 forki

Ok. Thanks for clarifying further. :+1:

svdHero avatar Jan 17 '20 07:01 svdHero

Restore is supported without need of cmd line. It just works. This wasn't always the case. Install cmd can be done from terminal within VS

This is only true of sdk-style projects, is it not? Old style projects still require manual restore.

jwosty avatar Jan 17 '20 16:01 jwosty

yes

forki avatar Jan 17 '20 16:01 forki