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

Support pack of global tools (`PackAsTool`) #3208

Merged
merged 4 commits into from May 18, 2018

Conversation

Projects
None yet
3 participants
@enricosada
Collaborator

enricosada commented May 17, 2018

require .net sdk >= 2.1.300

using PackAsTool with Pack target, allow to create tools (for .net core are FDD)

this PR:

  • remove the deps from generated nuspec
  • set the deps assemblies so are added to nupkg

if is just a console app (no p2p, deps are ok).

dotnet new console -lang f#
dotnet pack /p:PackAsTool=true

if you want, just put the nupkg in a reachable feed (local is ok), and do dotnet tool install mytool -g (global) or dotnet tool install mytool --tool-path "%CD%\dir_with_tools" (to put tools in dir_with_tools, so dir_with_tools\mytool will work)

if is a console app with p2p, put the PackAsTool property inside the fsproj, otherwise the p2p deps are not added in the nupkg.

NOTE if we modify the condition to check the type (lib vs exe), will be possibile to allow also /p:PackAsTool=true with p2p, but i dont care atm

dotnet new console -lang f#
# put the PackAsTool property in fsproj
dotnet pack

Tests are disabled atm (but works), i'll upgrade everything to 2.1.300-rc1 with #3183 so can be run

enricosada added some commits May 17, 2018

moved PackAsTool property just for console project
Otherwise if the PackAsTool property is global (from commandline) the p2p deps are not added

@enricosada enricosada requested review from forki and matthid May 17, 2018

@enricosada

This comment has been minimized.

Collaborator

enricosada commented May 17, 2018

/cc @matthid if you need that for FAKE. i needed for #3183

@enricosada

This comment has been minimized.

Collaborator

enricosada commented May 17, 2018

@forki @matthid ready to review for merge!

@matthid

Yes looks good! We just need to remember to enable the tests later on, maybe we can add a bullet-point in the linked PR.

@enricosada enricosada referenced this pull request May 17, 2018

Merged

Full netcore #3183

4 of 4 tasks complete

@forki forki merged commit 04b7d9d into fsprojects:master May 18, 2018

1 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment