dotnet build --native
Steps to reproduce
when i run the command dotnet build --native, i got the message
Specify --help for a list of available options and commands.
Unrecognized option '--native'
was the --native option removed?
dotnet --info output:
.NET Command Line Tools (1.0.0-rc2-002543)
Product Information:
Version: 1.0.0-rc2-002543
Commit Sha: 38d0c28a1e
Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
RID: win10-x64
1.0版本应该不会支持了,后续版本应该会加入。
If you clone and build CoreRT, it will put a version of the CLI into Tools/dotnetcli that supports build --native.
https://github.com/dotnet/cli/issues/2622#issuecomment-213442129 https://github.com/dotnet/cli/commit/3472aee5c9378bc885714e9b9580d0ba46119a62
i has konwn it, thanks.
native support has been removed from build for the current release.
@brthor Thanks for the clarification. Could you tell us a rough timeline when the --native option comes back?
I agree when do you think it will be back in? This being missing is the number one reason we are not jumping on the full build system.
We are currently in the process of determining if .NET Native is viable in our situation. Is there a workaround for this issue? I tried building CoreRT from source as mentioned by @dasMulli, but it is also missing the native argument.
@Genbox: The instructions for CoreRT habe been updated for use with CI / nightly -preview3 cli builds: https://github.com/dotnet/corert/blob/master/Documentation/how-to-build-and-run-ilcompiler-in-console-shell-prompt.md
@dasMulli That is the documentation I was following. The part about "dotnet new --type MSBuild" threw an error about MSBuild not being supported. I used the dotnet.exe file generated by the build process and not the one from PATH, just to be sure.
Do you know if the daily builds can be downloaded from Travis? I clicked around a bit and it did not seem to have a download button.
@Genbox use the links in the README.md of the rel/1.0.0 branch to get new CI builds of the CLI. the --type msbuild has been dropped very recently because now all C# templates are msbuild-based and you can just use dotnet new.
@dasMulli Oh, I see! Thanks, I'll try it again with the new CLI builds.
@Genbox dotnet native for anything other than UWP apps is not supported as of yet as far as i know.
@dasMulli there are some unquoted path problems as well as issues with the commands. I'll try again on Monday and see if I can track down the issues.
@shahid-pk Yeah, that is the same thing the .NET Native team told me about 1½ year back when we mailed back and forth. However, "dotnet new", "dotnet restore" and finally "dotnet build --native" resulted in a native console application that ran without .NET on Windows 7, which is what I'm looking for.
As long as Microsoft actively kills a feature for one platform that is supported in another, they are working counter to the idea of their purported claims of cross platform functionality. This is why I looked into dotnet, but ultimately decided it was not a good for genuine cross platform solution development.
As was specified in this thread, the --native option has been removed at one point during development of the CLI. You can find the CoreRT bits on https://github.com/dotnet/corert which should have all the info you need to start using it. Will close this issue. Thanks!