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

.NET Core SDK helpers #1314

Closed
enricosada opened this issue Jul 21, 2016 · 16 comments
Closed

.NET Core SDK helpers #1314

enricosada opened this issue Jul 21, 2016 · 16 comments

Comments

@enricosada
Copy link

enricosada commented Jul 21, 2016

Helpers for .NET Core SDK commands

  • dotnet pack
  • dotnet build
  • dotnet test
  • dotnet publish

initial work from @forki #1309 #1310 #1311 #1313

Most command have two important options

--framework: the fw (like netstandard1.6 or netcoreapp1.0 or net45)
--runtime: the target os ( win, osx ) if there are multiple

dotnet restore useful

  • the fallback: -f|--fallbacksource <FEED> A list of packages sources to use as a fallback. really nice to restore a built locally package from directory, without a need for a feed.
  • verbosity: -v|--verbosity <verbosity> The verbosity of logging to use. Allowed values: Debug, Verbose, Information, Minimal, Warning, Error.

dotnet pack usefull

  • the version suffix: --version-suffix <VERSION_SUFFIX> Defines what*should be replaced with in version field in project.json. it cannot replace complety the version, but nice for prerelease number

And the most important of all, -v.

  • dotnet cmd run the cmd
  • dotnet --verbose cmd (the --verbose or -v is BEFORE command), show all command line execution for all commands, it's really really useful in log

Another useful command (for log in ci server) is dotnet info who show all dotnet core sdk info, instead dotnet --version show only version.

@alexvaluyskiy
Copy link

I've just updated our build script to the newest FAKE. Looks good, but I really need two additional features

  1. Export tests results to xml file (I can use -xml paremeter in xunit test runner, and Idk how to do it in nunit test runner)
  2. Set output dir for nuget packages (-output parameter in dotnet pack)
  3. Set version-suffix parameter in dotnet pack

@forki
Copy link
Member

forki commented Jul 21, 2016

see #1321

@enricosada
Copy link
Author

  1. dotnet test -xml testsresult.xml
  2. 👍
  3. 👍

@forki
Copy link
Member

forki commented Jul 21, 2016

dotnet test -xml testsresult.xml doesn't work. dnc doesn't like that param

@enricosada
Copy link
Author

nunit or xunit? works with xunit
can you try with nunitlite param --result? probably other params are passed to test excutor

@forki
Copy link
Member

forki commented Jul 21, 2016

I'm not sure I undestand how that works. @enricosada can you send a PR when you find time? for now we have #1322

@enricosada
Copy link
Author

enricosada commented Jul 21, 2016

dotnet test --result:prova.xml for nunit, see https://github.com/nunit/docs/wiki/NUnitLite-Options
dotnet test -xml prova.xml for xunit

unrecognized argument of dotnet test are passed to specific implementation. a common out format or parameter doesnt exists atm i think.

@forki
Copy link
Member

forki commented Jul 21, 2016

so how would we model that? allow test helper to take in additional args?

@enricosada
Copy link
Author

Yes, that's good. reading the project.jspn testrunner property is too much

All command can add additional arguments right? That's not a base behavior for command task?

@forki
Copy link
Member

forki commented Jul 21, 2016

#1323

@alexvaluyskiy
Copy link

alexvaluyskiy commented Jul 21, 2016

Is NunitLite the same as https://www.nuget.org/packages/dotnet-test-nunit/3.4.0-beta-1 ?

@enricosada
Copy link
Author

Practically for command line.
But dotnet test give remote execution, for example for test runners.

@alexvaluyskiy
Copy link

Why your implementation of DotnetCli helpers looks like completely different from the same helpers from CoreClr branch?
https://github.com/fsharp/FAKE/blob/master/src/app/FakeLib/DotNetCLIHelper.fs#L103
vs
https://github.com/matthid/FAKE/blob/coreclr/src/app/Fake.DotNet.Cli/Dotnet.fs#L286

@forki
Copy link
Member

forki commented Jul 25, 2016

it was developed independently ;-)
cc @matthid

@matthid
Copy link
Member

matthid commented Jul 25, 2016

@dsyme
Copy link
Collaborator

dsyme commented Dec 5, 2016

Fixed by #1387

@dsyme dsyme closed this as completed Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants