Skip to content
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

enricosada
Copy link
Collaborator

@enricosada 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 "�%\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 enricosada requested review from forki and matthid May 17, 2018 17:24
@enricosada
Copy link
Collaborator Author

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

@enricosada
Copy link
Collaborator Author

enricosada commented May 17, 2018

@forki @matthid ready to review for merge!

Copy link
Member

@matthid matthid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 mentioned this pull request May 17, 2018
4 tasks
@forki forki merged commit 04b7d9d into fsprojects:master May 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants