Paket.VisualStudio
Paket.VisualStudio copied to clipboard
Paket init
Currently, you can go to a solution with no NuGet packages and do a "Convert From", which seems to work and generate paket.dependencies etc.. It would be better to have an Init command (ideally available as a context item on the solution node in solution explorer). This should in a perfect world also create an empty paket.references file in every project in the solution.
+1. I just also wanted to open exactly this issue. In the new Solution I don't want even start with NuGet. But for starting with Paket you need to open a console.
I guess it's not implemented since I always projectscaffold new solutions. But yes this could be added. Any volunteers? On Nov 12, 2015 12:09, "Andreas Vilinski" [email protected] wrote:
+1. I just also wanted to open exactly this issue. In the new Solution I don't want even start with NuGet. But for starting with Paket you need to open a console.
— Reply to this email directly or view it on GitHub https://github.com/fsprojects/Paket.VisualStudio/issues/85#issuecomment-156076244 .
@vilinski you can use convey from nugget. It's not perfect but works.
@forki I can try. But not for another week or so.
@isaacabraham yes, i use it all the time like here:
- open folder in atom with ionide
- paket convert from nuget
- profit :)
Once again I'm lagging behind here with my "I'll try to do this". Sorry.
@isaacabraham I actually did implement the init function in the VS addin yesterday, but then after using it I realized that function is utterly useless. Like @vilinski said, you can simply use convert from nuget instead and it'll do a much better job. paket init
only creates a paket.dependencies file, I don't think we need a UI command for that. Not only that, but I think there is a bug or at least inconsistencies when creating that paket.dependencies
file because when you use paket init
, it adds the nuget v2 source, but when you use convert from nuget it adds nuget v3 (with both exact same solutions that don't have anything special in them yet).
What I would like to see though is something that adds a paket.references file to each project in the solution. Currently you look to manually do that. So this would be more than just paket init
but something that sets up the solution (and projects) ready for paketing.
@isaacabraham convert-from-nuget
does add the solution level folder and link to paket.dependencies
.
You don't need
paket.references
in your projects if you don't have... references yet. So after you've run convert-from-nuget
you can use the UI to add packages and it'll create the paket.references
for you and update the paket.dependencies
I never use the Paket UI in VS - I find it too slow. I just go to the paket.dependencies file and manually add in the dependency I need, then do Paket install.
Maybe I should give it another go.
I guess the point I'm making is that there are two different uses for the Paket tooling in VS - full UI integration, and lightweight command tooling (like Code and Atom) to quickly run commands like "paket install" or "add references file to this project" etc. etc. for a more "code-first" approach.
Ok, but what are you looking for exactly (what are you missing from the convert-from-nuget
command) ? You want it to create empty paket.references in each project of the solution ?
Yes. Oh and maybe add paket.lock to the paket folder whilst we're at it - sometimes it's useful to look at.
Ok then I will let you handle this and see with @forki if it's the direction you guys want to take. It seems to me like we're leaving the the paket world at that point since those things aren't actually required to setup a paket enabled solution, it seems more like a convenience in your case, which I would argue could be done with scripts. Empty paket.references
aren't really required, but I understand in your case it's more convenient for you because it will save you the step to manually create them. Same for the lock file, which is only needed when you actually add references, and paket update
will create that file for you anyway.
I don't want to have the lock file in VS to modify it :-) Just to read it.