-
Notifications
You must be signed in to change notification settings - Fork 523
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
Add support for using paket as a .NET Core 3 local tool #3660
Comments
I'd be happy to get PRs
Thomas Boby <notifications@github.com> schrieb am Mo., 23. Sep. 2019, 10:24:
… Description
.NET Core 3 adds support for repository specific tools that are restored
with the correct version for your platform. These are defined in a manifest
called dotnet-tools.json, a lockfile for dotnet "local" tools.
This removes the need to commit paket.exe, removes the need for mono, and
generally makes it really easy to install paket.
Paket can be defined as a dependency in this way, correctly restores, and
can be manually run using dotnet paket or dotnet tool run paket.
However, Paket.Restore.targets does not seem to know about local tools.
Repro steps
1.
clone https://github.com/tboby/paket-local-tool-sample
2.
dotnet tool restore
3.
cd src
4.
dotnet build
Expected behavior
The project should trigger a paket restore, then build.
Actual behavior
'"paket.exe"' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Thomas\Git\paket-local-tool-sample\.paket\Paket.Restore.targets(138,5): error MSB3073: The command ""paket.exe" restore" exited with code 9009. [C:\Users\Thomas\Git\paket-local-tool-sample\src\paket-local-tool-sample.fsproj]
Known workarounds
Add <PaketCommand>dotnet paket</PaketCommand> to the project file.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3660?email_source=notifications&email_token=AAAOANCS33ERPYALNGABCZ3QLB4K5A5CNFSM4IZHYNGKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HM66YIA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAOANGOB5RSP43HMWIO5BTQLB4K5ANCNFSM4IZHYNGA>
.
|
As far as I can tell msbuild doesn't know about local tools, and the path to the local tool probably isn't consistent (e.g. |
It appears that PaketCommand in Paket.Restore.targets is missing the case for Paket as a local tool i.e. when PaketExePath does not have an extension. Inserting the following line temporarily fixes the issue, until that file is overwritten: I'm happy to create a PR for this if anyone can point me towards where best to extend any tests that cover the state of that file. |
Was just about to try this and hit the same issue and can confirm adding that line, @kjohnphillip, works on my linux machine (if you haven't already checked that). |
Please send PR |
I have just tested on my linux box though and am wondering the same as above if there are any tests or for changes like this. |
no we don't have tests for targets files. |
Description
.NET Core 3 adds support for repository specific tools that are restored with the correct version for your platform. These are defined in a manifest called
dotnet-tools.json
, a lockfile for dotnet "local" tools.This removes the need to commit paket.exe, removes the need for mono, and generally makes it really easy to install paket.
Paket can be defined as a dependency in this way, correctly restores, and can be manually run using
dotnet paket
ordotnet tool run paket
.However,
Paket.Restore.targets
does not seem to know about local tools.Repro steps
clone
https://github.com/tboby/paket-local-tool-sample
dotnet tool restore
cd src
dotnet build
Expected behavior
The project should trigger a paket restore, then build.
Actual behavior
Known workarounds
Add
<PaketCommand>dotnet paket</PaketCommand>
to the project file.The text was updated successfully, but these errors were encountered: