Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit a233648

Browse files
committed
Update the document for netcoreapp2.1
1 parent 4f58962 commit a233648

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

Documentation/workflow/UsingYourBuild.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ standard 'dotnet' host that installs with .NET Core SDK.
1717
The released version of 'dotnet' tool may not be compatible with the live CoreCLR repository. The following steps
1818
assume use of a dogfood build of the .NET SDK.
1919

20-
## Acquire the latest nightly .NET Core 2.0 SDK
20+
## Acquire the latest nightly .NET Core SDK
2121

2222
- [Win 64-bit Latest](https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.zip)
2323
- [macOS 64-bit Latest](https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-osx-x64.tar.gz)
@@ -28,9 +28,9 @@ or always fully qualify the path to dotnet in the root of this folder for all th
2828

2929
After setting up dotnet you can verify you are using the newer version by:
3030

31-
`dotnet --info` -- the version should be greater than 2.0.0-*
31+
`dotnet --info` -- the version should be greater than 2.1.0-*
3232

33-
For another small walkthrough see [Dogfooding .NET Core 2.0 SDK](https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/dogfooding.md).
33+
For another small walkthrough see [Dogfooding .NET Core SDK](https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/dogfooding.md).
3434

3535
## Create sample self-contained application
3636

@@ -50,13 +50,13 @@ shared framework. In order to do that you will need to add a `RuntimeIdentifier
5050
```
5151
<PropertyGroup>
5252
...
53-
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
53+
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
5454
</PropertyGroup>
5555
```
5656

57-
For windows you will want `win7-x64` but for other OS's you will need to set it to the most appropriate one based
57+
For windows you will want `win-x64` but for other OS's you will need to set it to the most appropriate one based
5858
on what you built. You can generally figure that out by looking at the packages you found in your output. In our
59-
example you will see there is a package with the name `runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR.2.0.0-beta-25023-0.nupkg`
59+
example you will see there is a package with the name `runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR.2.1.0-beta-25023-0.nupkg`
6060
so you will want to put whatever id is between `runtime.` and `Microsoft.NETCore.Runtime.CoreCLR`.
6161

6262
Next you need to restore and publish. The publish step will also trigger a build but you can iterate on build by calling `dotnet build` as
@@ -67,21 +67,17 @@ dotnet restore
6767
dotnet publish
6868
```
6969

70-
After you publish you will find you all the binaries needed to run your application under `bin\Debug\netcoreapp2.0\win7-x64\publish\`.
70+
After you publish you will find you all the binaries needed to run your application under `bin\Debug\netcoreapp2.1\win-x64\publish\`.
7171
To run the application simply run the EXE that is in this publish directory (it is the name of the app, or specified in the project file).
7272

7373
```
74-
.\bin\Debug\netcoreapp2.0\win7-x64\publish\HelloWorld.exe
74+
.\bin\Debug\netcoreapp2.1\win-x64\publish\HelloWorld.exe
7575
```
7676

7777
Thus at this point publication directory directory has NO dependency outside that directory (including dotnet.exe). You can copy this publication
7878
directory to another machine and run the exe in it and it will 'just work' (assuming you are on the same OS). Note that your managed app's
7979
code is still in the 'app'.dll file, the 'app'.exe file is actually simply a rename of dotnet.exe.
8080

81-
**NOTE**: Normally you would be able to run the application by calling `dotnet run` however there is currently tooling issues which lead to an error similar
82-
to `A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in ...` so to workaround that for
83-
now you have to manually run the application from the publish directory.
84-
8581

8682
## Update CoreCLR from raw binary output
8783

@@ -97,7 +93,7 @@ you wish to update the DLLs. For example typically when you update CoreCLR you e
9793
* System.Private.CoreLib.dll - If you modified C# it will end up here.
9894

9995
Thus after making a change and building, you can simply copy the updated binary from the `bin\Product\<OS>.<arch>.<flavor>`
100-
directory to your publication directory (e.g. `helloWorld\bin\Debug\netcoreapp2.0\win7-x64\publish`) to quickly
96+
directory to your publication directory (e.g. `helloWorld\bin\Debug\netcoreapp2.1\win-x64\publish`) to quickly
10197
deploy your new bits. In a lot of cases it is easiest to just copy everything from here to your publication directory.
10298

10399
You can build just the .NET Library part of the build by doing (debug, for release add 'release' qualifier)
@@ -138,10 +134,10 @@ this by simply listing the name of the Microsoft.NETCore.Runtime.CoreCLR you bui
138134
and you will get name of the which looks something like this
139135

140136
```
141-
Microsoft.NETCore.Runtime.CoreCLR.2.0.0-beta-25023-0.nupkg
137+
Microsoft.NETCore.Runtime.CoreCLR.2.1.0-beta-25023-0.nupkg
142138
```
143139

144-
This gets us the version number, in the above case it is 2.0.0-beta-25023-0. We will
140+
This gets us the version number, in the above case it is 2.1.0-beta-25023-0. We will
145141
use this in the next step.
146142

147143
#### 2 - Add a reference to your runtime package
@@ -150,7 +146,7 @@ Add the following lines to your project file:
150146

151147
```
152148
<ItemGroup>
153-
<PackageReference Include="Microsoft.NETCore.Runtime.CoreCLR" Version="2.0.0-beta-25023-0" />
149+
<PackageReference Include="Microsoft.NETCore.Runtime.CoreCLR" Version="2.1.0-beta-25023-0" />
154150
</ItemGroup>
155151
```
156152

@@ -203,12 +199,12 @@ give it a value by setting the BuildNumberMinor environment variable.
203199
```bat
204200
set BuildNumberMinor=3
205201
```
206-
before packaging. You should see this number show up in the version number (e.g. 2.0.0-beta-25023-03).
202+
before packaging. You should see this number show up in the version number (e.g. 2.1.0-beta-25023-03).
207203

208204
As an alternative you can delete the existing copy of the package from the Nuget cache. For example on
209205
windows (on Linux substitute ~/ for %HOMEPATH%) you could delete
210206
```bat
211-
%HOMEPATH%\.nuget\packages\Microsoft.NETCore.Runtime.CoreCLR\2.0.0-beta-25023-02
207+
%HOMEPATH%\.nuget\packages\Microsoft.NETCore.Runtime.CoreCLR\2.1.0-beta-25023-02
212208
```
213209
which should make things work (but is fragile, confirm file timestamps that you are getting the version you expect)
214210

0 commit comments

Comments
 (0)