Run the 'dotnet' sdk command line tool
The dotnet command line tool can build and publish projects.
Minimal working example
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: |
|
More API Documentation
SDK tools (local, global, clireference)
Some dotnet SDK based tools support project or path based installation. These tools have a ToolType parameter in addition to the ToolPath or ExePath parameters.
Note: If your tool doesn't have this parameter please send a pull request to add it. See the
ReportGenerator.fsfile changes in PR 2399 on an example what needs to be changed. BasicallyCreateProcess.withFrameworkis replaced withCreateProcess.withToolType.
You can use the parameter similar to this (in this example to start the reportgenerator as local tool with dotnet reportgenerator):
1: 2: 3: 4: 5: 6: |
|
Here are the possible options:
ToolType.CreateFullFramework(): Start as dotnet global tool (<tool>.exe,monoprefix on unix). This is the default and how fake behaved historically for most tools.ToolType.CreateFrameworkDependentDeployment(install.Value): Start as framework dependendt deployment (dotnet <tool>.dll, nomonoprefix on unix)ToolType.CreateGlobalTool(): Start as dotnet global tool (<tool>.exe, nomonoprefix on unix)ToolType.CreateLocalTool(install.Value): Start as dotnet local tool (dotnet <tool>)ToolType.CreateCLIToolReference(install.Value): Start as dotnet cli tool reference (dotnet <tool>)
To set a different tool command (first argument of dotnet) DotNet.Option, for example because you use your own package with a different tool name. You can use:
1: 2: 3: 4: |
|
This will call dotnet alternative <arguments>