fsprojects / Paket.VisualStudio

Manage your Paket (http://fsprojects.github.io/Paket/) dependencies from Visual Studio!
MIT License
147 stars 51 forks source link

Visual Studio 2019 Support #176

Open JimHume opened 5 years ago

JimHume commented 5 years ago

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

KinNeko-De commented 5 years ago

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.

ntwilson commented 5 years ago

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?

KinNeko-De commented 5 years ago

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 commented 5 years ago

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 :)

ntwilson commented 5 years ago

Thank you so much!

jwosty commented 4 years ago

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.

Krzysztof-Cieslak commented 4 years ago

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

Unimaginable horrors

jwosty commented 4 years ago

@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.

svdHero commented 4 years ago

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

forki commented 4 years ago

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

svdHero commented 4 years ago

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

forki commented 4 years ago

no it's totally ine to run paket from cmd

svdHero commented 4 years ago

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...

isaacabraham commented 4 years ago

@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?

svdHero commented 4 years ago

@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?

forki commented 4 years ago

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

svdHero commented 4 years ago

Ok. Thanks for clarifying further. :+1:

jwosty commented 4 years ago

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.

forki commented 4 years ago

yes