Hubert-Rybak / dotnet-warp

.NET Core global tool for producing single executable using Warp
MIT License
249 stars 23 forks source link

-f [TargetFramework] option not available #45

Closed msawczyn closed 4 years ago

msawczyn commented 4 years ago

I see that PR #39 was merged in back in October, 2019, but the published v1.1.0 doesn't seem to have that option available. Am I missing something?

C:\>dotnet tool install -g dotnet-warp
You can invoke the tool using the following command: dotnet-warp
Tool 'dotnet-warp' (version '1.1.0') was successfully installed.

C:\>dotnet-warp --help
Packs project to single binary, with optional linking.

Usage: dotnet-warp [arguments] [options]

Arguments:
  ProjectFileOrFolder      Project path.

Options:
  -r|--rid <RID>           Optional. Sets RID passed to dotnet publish. Defaults to current portable RID (win-x64, linux-x64, osx-x64).
  -l|--link-level <LEVEL>  Optional. Enables linking with desired level. Available values: Normal, Aggressive. Aggressive means, that application assemblies will not be rooted, and can also be trimmed.
  -nc|--no-crossgen        Optional linker option. Disables Cross Gen during publish. Sometimes required for linker to work. See issue: https://github.com/mono/linker/issues/314
  -o|--output              Optional. Full output binary path. Defaults to current directory + assembly name.
  -v|--verbose             Optional. Enables verbose output.
  -p|--property            Optional. Pass any additional MSBuild properties to 'dotnet publish' command.Example: -p:Version=2.0.1
  -?|-h|--help             Show help information

C:\>dotnet-warp "C:\Code\TestApp\TestApp.csproj" -f netcoreapp3.1 --verbose -o "C:\Code\TestApp\Published\netcoreapp3.1"
Specify --help for a list of available options and commands.
Unrecognized option '-f'
mudasar commented 4 years ago

Hi, I beleive you have to use it like -p|--property Optional. Pass any additional MSBuild properties to 'dotnet publish' command.Example: -p:Version=2.0.1 a different approach would be add a publish profile and than build-publish

msawczyn commented 4 years ago

I had initially thought so, but see that in Program.cs:44 it's a top-level option. This makes me wonder if the 1.1.0 release was built from the current source, since 1.1.0 seems to be unaware of that option.

msawczyn commented 4 years ago

-p TargetFramework=netcoreapp3.1 does the trick.