diff options
author | Jan Kotas <jkotas@microsoft.com> | 2016-10-01 16:12:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-01 16:12:07 +0300 |
commit | 4761cccda5af0137290c825d4340bd7c361bb8a8 (patch) | |
tree | 355a7cefaa4b7c4b0459a01fb2e84b1842a74619 | |
parent | 7601cb05c3d52419db4158716115c68243f46703 (diff) |
Fix steps for console shell prompt (#1960)
-rw-r--r-- | Documentation/how-to-build-and-run-ilcompiler-in-console-shell-prompt.md | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Documentation/how-to-build-and-run-ilcompiler-in-console-shell-prompt.md b/Documentation/how-to-build-and-run-ilcompiler-in-console-shell-prompt.md index e2a7ea2e7..b5eb939e8 100644 --- a/Documentation/how-to-build-and-run-ilcompiler-in-console-shell-prompt.md +++ b/Documentation/how-to-build-and-run-ilcompiler-in-console-shell-prompt.md @@ -16,7 +16,7 @@ This will result in the following: # Install latest CLI tools -* Download latest CLI tools from https://github.com/dotnet/cli/ and add them to the path +* Download latest CLI tools from https://github.com/dotnet/cli/ and add them to the path. The latest CLI tools include MSBuild support that the native compilation build integration depends on. * On windows ensure you are using the 'VS2015 x64 Native Tools Command Prompt' (This is distinct from the 'Developer Command Prompt for VS2015') @@ -27,6 +27,20 @@ You should now be able to use the `dotnet` commands of the CLI tools. * Ensure that you have done a repo build per the instructions above. * Create a new folder and switch into it. * Run `dotnet new --type MSBuild` on the command/shell prompt. This will add a project template. If you get an error, please ensure the [pre-requisites](prerequisites-for-building.md) are installed. +* Add the following `NuGet.Config` to your project. The CLI MSBuild support requires packages that have not been published to nuget.org yet. This step won't be necessary after official release. +``` +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <packageSources> + <!--To inherit the global NuGet package sources remove the <clear/> line below --> + <clear /> + <add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" /> + <add key="cli-deps" value="https://dotnet.myget.org/F/cli-deps/api/v3/index.json" /> + <add key="xunit" value="https://www.myget.org/F/xunit/api/v3/index.json" /> + <add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" /> + </packageSources> +</configuration> +``` * Run `dotnet restore`. This will download nuget packages required for compilation * Add the following line at the end of `.csproj` file that is part of your project. ``` @@ -40,7 +54,7 @@ This approach uses the same code-generator (RyuJIT), as [CoreCLR](https://github From the shell/command prompt, issue the following commands, from the folder containing your project, to generate the native executable ``` - dotnet build3 /p:IlcPath=<repo_root>\bin\Product\Windows_NT.x64.Debug\packaging\publish1 + dotnet build3 /t:LinkNative /p:IlcPath=<repo_root>\bin\Product\Windows_NT.x64.Debug\packaging\publish1 ``` Native executable will be dropped in `./bin/[configuration]/native/` folder and will have the same name as the folder in which your source file is present. |