sdk icon indicating copy to clipboard operation
sdk copied to clipboard

dotnet build --native

Open jeffwudev opened this issue 10 years ago • 16 comments

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

jeffwudev avatar May 02 '16 02:05 jeffwudev

1.0版本应该不会支持了,后续版本应该会加入。

717009629 avatar May 02 '16 03:05 717009629

If you clone and build CoreRT, it will put a version of the CLI into Tools/dotnetcli that supports build --native.

dasMulli avatar May 02 '16 04:05 dasMulli

https://github.com/dotnet/cli/issues/2622#issuecomment-213442129 https://github.com/dotnet/cli/commit/3472aee5c9378bc885714e9b9580d0ba46119a62

gitchomik avatar May 02 '16 07:05 gitchomik

i has konwn it, thanks.

jeffwudev avatar May 02 '16 08:05 jeffwudev

native support has been removed from build for the current release.

brthor avatar May 02 '16 19:05 brthor

@brthor Thanks for the clarification. Could you tell us a rough timeline when the --native option comes back?

justinyoo avatar May 16 '16 13:05 justinyoo

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.

maxfridbe avatar Oct 14 '16 19:10 maxfridbe

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 avatar Oct 19 '16 10:10 Genbox

@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 avatar Oct 19 '16 13:10 dasMulli

@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 avatar Oct 19 '16 22:10 Genbox

@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 avatar Oct 19 '16 22:10 dasMulli

@dasMulli Oh, I see! Thanks, I'll try it again with the new CLI builds.

Genbox avatar Oct 19 '16 22:10 Genbox

@Genbox dotnet native for anything other than UWP apps is not supported as of yet as far as i know.

shahid-pk avatar Oct 20 '16 07:10 shahid-pk

@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.

Genbox avatar Oct 20 '16 08:10 Genbox

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.

sylnsr avatar Oct 30 '16 21:10 sylnsr

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!

thesmithee avatar Jan 14 '17 15:01 thesmithee