-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET Core paket and dotnet/sdk #2875
Comments
Is there a way to put bootstrapper directly into sdk? |
yes that's another way. two options afaik: bundled in sdk, as app/packageTechnically, yes. we have done that for fsharp.net.sdk, and put inside sdk is just a packaging thing (cli/sdk build script restore a pinned package and unzip in release dir). Issue is, if there is an error in boostrapper, you need another release of sdk to fix that (and just sdk team can schedule that). as Sdk attributeAnother possibility, the real issue, is if Both mean will work only with new msbuild/cli/sdks versions.. and given the churn in sdk tooling and the need for stability, ihmo is not going to be implemented soon.. |
ok, dotnet cli is adding tools (sdk scooped) in v2.2 (ref https://github.com/dotnet/cli/issues/8067 ) we can use that later for boostrapper. meanwhile need another options for that And paket can manage tools too, because should be easy. adding per repo tools (who can be used to self-update itself, if the boostrapper is just paket) the tools are just .net core fdd app published in the ref a nuspec <?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>global.tool.console.demo</id>
<version>1.0.4</version>
<description>test app</description>
<authors>testauthor</authors>
</metadata>
<files>
<file src="bin\Release\netcoreapp2.1\publish\*.*" target="tools\netcoreapp2.1\" />
<file src="DotnetToolsConfig.xml" target="tools\DotnetToolsConfig.xml" />
</files>
</package> and an xmlfile to read the entry points, so commands can be renamed and multiple <?xml version="1.0" encoding="utf-8" ?>
<DotNetCliTool>
<Commands>
<Command Name="demo" EntryPoint="consoledemo.dll" Runner="dotnet" />
</Commands>
</DotNetCliTool> |
For interested ppl, there is a demo version on a ready to use repository ( more info #2918 (comment) ). based on the PR wip, will be updated |
By @0x53A in #2418 (comment)
MSBuild spec: dotnet/msbuild#1493 There is nothing to do at the moment - but as soon as NuGet actually implements this stuff, we should also start so we don't hang behind. From the empty checklists in both issues, I would expect this to land in 16.0 maybe. The important question is how the resolving works when we don't control the host (VS or Rider, or VS Code, ...). |
Just a sanity check. Currently it is not possible to use only dotnetcore with Paket? You need to have .net framework or mono installed? |
yes to run paket you still need that. but @enricosada is working on it... |
ok, new WIP of install flow (maintaingn bootstrapper or not) in #3183 based on sdk tools ( .net core sdk >= 2.1.300 ). |
Any changes to this recently? |
@aggieben yes, latest (just today, i was working on it these days), is in https://github.com/enricosada/paket-netcore-testing-as-tool/ should be somewhat done (minus known bugs). please review the PR |
@enricosada @forki this seems to be done now that it can be used via |
The |
True, you can choose not to install it globally and use |
Is there a status update and/or getting-started guide for using Paket without either .NET Framework or Mono installed? The current docs all talk heavily about "paket.exe" and I'm wondering if we need to do a refresh? Thanks! |
@dsyme Atm i think not, because with .net core sdk 2.0 there were some issues to install paket locally in the repo ( if really needed, afaik like https://github.com/enricosada/paket-netcore-testing-as-tool/ works sort of, but i dont reccoment it yet. I am playing with .NET Core sdk 3.x who support local tools (two preview ago wasnt ok), i'll send a PR soon and that probably will be ok to use, based on prior experience with |
Given that What are the specific issues @enricosada? |
Hi, First of all - thanks for your great work, Paket team! I've just stumbled upon this problem - I was trying to run |
You should be installing paket as a .net sdk tool. If you do, it fits right into a dotnet SDK based pipeline:
This is how I use it with all of my work and OSS packages, and it works great. I should clarify here that this workflow is complete mono/.net framework-free, relying only on having dotnet sdk 3.0 or greater. |
It was supposed to be |
Yeah, that's right. I'll edit my answer to be correct :) |
Paket depends now on .NET framework (win) and mono (unix/mac).
This is really good because the normal paket.exe console app can run xplat if mono/.net is installed.
For some scenario, like .net core development (or fable) with new dotnet/sdk (new csproj/fsproj), the mono/.net shouldnt be needed.
To remove that deps of paket in these scenario there are some points to address:
net
/netcore
) because old sdk project can also use.net core
based paketAtm ihmo boostrapping and auto-updates are the real issue
Current Plan
Paket
nuget both paket .net core FDD (intools/netcoreapp2.0
) and paket .net fw (intools/net451
)paket
in PATHNotes
notes about console deployment options on .net core
Options are:
dotnet paket.dll
, so require a wrapper script to execute for UX (paket.cmd
/paket.sh
)dotnet
? is the right version installed?dotnet paket
paket.cmd
/paket.sh
)File size:
notes about paket, dotnet/sdk, .net core
paket is a strange tool, because atm for restore process, need to be there BEFORE the restore.
or at least a target file to override default nuget implementation in dotnet/sdk
instead old sdk require the exe to restore/update projs
But lots of challenges are shared with normal tools in .net ecosystem
There is no builtin
per repo
tools. or a way to script (like an fsx).AFAIK the most similar to
per repo
tools are the cli tools or the FDD.AFAIK the most similar to script is an msbuild target + optional task in assembly
How now .net sdk support external tools? or custom execute code xplat.
dotnet new
+ overrideProgram.cs
+dotnet publish
Other package manager expect the dev sdk installed, and use that to boostrap:
Possible solutions
My current ideas, not in preference order.
plan A
support tools at repo level natively in
dotnet/sdk
. ref https://github.com/dotnet/cli/issues/4723PRO:
CONS:
plan B
Why: paket deps doesnt change a lot. paket does.
like now, using native app (SCD) but smarter update mechanism
dotnet msbuild
(target + dll), to just downloadpaket.boostrapper.exe
PRO:
net
version like now, if want to support that tooCONS:
plan C
Why: support and enhance .net cli tools. use that support for paket itself.
Add support of repo level tools to paket and .net cli tools. Use a built paket native (SCD) to boostrap paket (replace previous paket.boostrapper.exe).
The chicked/egg solution.
dotnet-fable
), so small and easy to pack/versionpaket.depencies
who contains paket-cli as tooldotnet fable
) just invokedotnet
with args and a file with deps. paket generate these args/files neededdotnet hello
tool can be invoked ashello
. and paket aspaket
dotnet msbuild
to just download native paket per OSPRO:
dotnet fable
asfable
. will work in whole repo not just the proj dir.CONS:
boostrapper paket
schedule <> paket schedule, so doesnt need to update often. more maintance.Conclusions
Atm i prefer plan C, while is longer than B to implement, add a lot more value with less maintenance long term.
Plan A is ok, but doesnt help paket in medium term, because cannot replace current way.
TODO
as a note, i volounteer to implement the choosen solution. if someone want to help, will be nice, because tasks can be split
The text was updated successfully, but these errors were encountered: