Discussion: Official guidance on how to use Paket with .NET Core?
See original GitHub issueIt seems like users of Paket waited a long time to use it without the dependency on Mono, and we’ve been able to do so for a few months now. However, it’s not clear according to the docs whether there is a preferred method of using Paket in this new .NET Core world. Is it better to use it as a global tool? Or install it as a local tool in the /.paket
directory and commit it?
My personal opinion is that we should encourage the use of Paket as a global tool. It seems like package managers in other language ecosystems don’t require committing the package manager to the repo. I also think that it makes for a better user experience (i.e. paket add blah
vs ./paket/paket add blah
).
Do you have any thoughts on this?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Get started
Get started. This guide shows how to get started with Paket in various ways, depending on your scenario: Get started with .NET Core...
Read more >Is it possible to use Paket, with dotnetcore, with packages ...
Is there a guide/example project out there that demonstrates this specific use case, because I'm finding that the official Paket ...
Read more >What benefits do FAKE and PAKET provide over traditional ...
Paket allows managing diverse sets of dependencies for example, avoiding (or allowing you to avoid) the annoying version mismatch errors you get ...
Read more >Getting Started with Paket – Part 1 - The Cockney Coder
Paket will add the file to your project as a linked, read-only file as needed. Dependency Strategies. Before we get into the fun...
Read more >MSBuild reference for .NET SDK projects
Use the NetStandardImplicitPackageVersion property when you want to specify a framework version that's lower than the metapackage version. The ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@slang25 Using it as a global tool does work for me. To get it to recreate the
Paket.Restore.targets
you need to runpaket restore -f
(if you’re already using Paket), which unfortunately does a full restore again in addition to recreatingPaket.Restore.targets
. Would be nice to have an option to ONLY overwrite thePaket.Restore.targets
for this particular scenario.What I’d like to see is lowering the friction of being able to use Paket immediately, from command line, with just a couple of one-liners (and not having to edit or download anything manually). A lot of the steps to get started with it now make sense if you’re coming from the .NET community, but aren’t obvious if you’re totally new to .NET/F#/MSBuild.
Here’s my experience using Paket as a global tool from command line on macOS:
(warning: the GIF is a little long/slow for some reason. Please bear with it for a bit).
You can actually see that it works okay. The only major snafu is that it doesn’t add a reference to FSharp.Core by default, which can cause issues. On the plus side though, the user experience is pretty good:
dotnet tool install -g Paket
dotnet console new -lang F#
paket init
dotnet run
, which will work.If you add a package though using
paket add {PackageName}
and then dodotnet run
, it fails. I wonder if it would be better for user experience to add a reference to FSharp.Core to *.fsproj files by default (but print an appropriate warning, similar to what’s printed today). And make this configurable via some configuration file.A few open questions:
paket-files
directory, and also a.paket
directory. If you’re using Paket as a global tool, the only thing stored in.paket
is thePaket.Restore.targets
file. Which seems kind of “wrong”/inefficient from an engineering perspective, but maybe it’s worth living with since it’s not that big a deal and changing it would be complicated.What do you think?
Regarding the startup friction, have you looked at https://github.com/thinkbeforecoding/paket.install? It creates a setup based on https://github.com/enricosada/paket-netcore-testing-as-tool that works quite well in my experience. It also adds the relevant bits to .gitignore so that having paket as local tool is not a problem: