jmrog / vscode-nuget-package-manager

An extension for Visual Studio Code that lets you easily add or remove .NET Core 1.1+ package references to/from your project's .csproj file using Code's Command Palette.
MIT License
34 stars 17 forks source link

Multiple csproj files / sln file #10

Closed wheatandtares closed 7 years ago

wheatandtares commented 7 years ago

So far it seems this is the only nuget package manager that works with csprojs, and it works great. Though honestly I didn't give pakit the time of day because of all the files it wrote for no reason.

This project doesn't seem to support multiple csprojs or sln files. It seems like I just get Cannot read the file at {{workspaceRoot}}/{{directoryName}}.csproj whenever vscode is not scoped to that project specifically.

I would like to see behavior like dotnet restore's where it asks me for the target csproj file to work with. Later we might do a feature where the csproj at the top of the list will be determined by the file that most recently had cursor focus.

I know this lack of multiple csproj support isn't exactly news to the maintainer, but I think it should be bumped up the priority list if we want this extension to be adopted generally, otherwise someone else is going to beat us to it.

jmrog commented 7 years ago

This is a good idea! Thanks for the suggestion. I'll look into implementing it as soon as I have time (PRs are also welcome)!

jmrog commented 7 years ago

@arexsutton I now have a version of this extension ready that should support multiple .csproj files. It should find any .csproj files anywhere inside of your workspace's root directory; if it finds only one, it will just use that one, but if it finds multiple, it will ask you which one to use. If you are interested in trying this version out and letting me know how it works for you, that would be awesome! There are some big changes, so I'd love for people to test it before the extension is fully released.

You can find it packaged here: https://github.com/jmrog/vscode-nuget-package-manager/blob/jr/v1.0.0/dist/vscode-nuget-package-manager-1.0.0.vsix

If you're not sure how to install an extension from a distributed package, check out the instructions here: https://code.visualstudio.com/docs/extensions/install-extension#_install-from-a-vsix

(If you'd rather just wait for the actual extension release, that's fine too. :) I'll probably release formally in a few hours, but will wait a bit and see, first.)

jmrog commented 7 years ago

Closed by #13.