From 1c9e2e85487ee81d5b40fc648092c85b7edad7f0 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Fri, 24 Aug 2018 15:19:44 -0700 Subject: [PATCH] Update version in documentation samples to 3.0 Commit migrated from https://github.com/dotnet/coreclr/commit/e8b51f16267715db62f8f17a2e159dcba07149aa --- docs/coreclr/workflow/UsingDotNetCli.md | 36 ++++++++++++++++----------------- docs/coreclr/workflow/UsingYourBuild.md | 20 +++++------------- 2 files changed, 23 insertions(+), 33 deletions(-) diff --git a/docs/coreclr/workflow/UsingDotNetCli.md b/docs/coreclr/workflow/UsingDotNetCli.md index dd3c635..b1ee596 100644 --- a/docs/coreclr/workflow/UsingDotNetCli.md +++ b/docs/coreclr/workflow/UsingDotNetCli.md @@ -60,14 +60,14 @@ Please run `dotnet new console` in the app folder and update the created `.cspro Exe - netcoreapp2.1 + netcoreapp3.0 win-x64 - 2.1.0-preview1-26210-0 + 3.0.0-preview1-26210-0 - - + + @@ -76,10 +76,10 @@ Please run `dotnet new console` in the app folder and update the created `.cspro **You have to set the correct values for `RuntimeIdentifier` (RI), `RuntimeFrameworkVersion` and versions of both packages.** You can generally figure that out by looking at the packages you found in your output. -In our example you will see there is a package with the name `runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR.2.1.0-preview1-26210-0.nupkg` +In our example you will see there is a package with the name `runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR.3.0.0-preview1-26210-0.nupkg` ``` -runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR.2.1.0-preview1-26210-0.nupkg +runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR.3.0.0-preview1-26210-0.nupkg ^--RI---^ ^--------version-------^ ``` @@ -110,22 +110,22 @@ Make sure that restoring done by `dotnet publish` installed the explicit version ``` PS C:\coreclr\helloWorld> dotnet publish Restoring packages for C:\coreclr\helloWorld\helloWorld.csproj... - Installing runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR 2.1.0-preview1-26210- + Installing runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR 3.0.0-preview1-26210- ``` If you see something like the message below it means that it has failed to restore your local runtime packages. In such case double check your `NuGet.config` file and paths used in it. ``` -C:\coreclr\helloWorld\helloWorld.csproj : warning NU1603: helloWorld depends on runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR (>= 2.1.0-preview1-26210-0) but runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR 2.1.0-preview1-26210-0 was not found. An approximate best match of runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR 2.1.0-preview2-25501-02 was resolved. +C:\coreclr\helloWorld\helloWorld.csproj : warning NU1603: helloWorld depends on runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR (>= 3.0.0-preview1-26210-0) but runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR 3.0.0-preview1-26210-0 was not found. An approximate best match of runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR 3.0.0-preview2-25501-02 was resolved. ``` ### 6. Run the app -After you publish you will find all the binaries needed to run your application under `bin\Debug\netcoreapp2.1\win-x64\publish\`. +After you publish you will find all the binaries needed to run your application under `bin\Debug\netcoreapp3.0\win-x64\publish\`. 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). ``` -.\bin\Debug\netcoreapp2.1\win-x64\publish\HelloWorld.exe +.\bin\Debug\netcoreapp3.0\win-x64\publish\HelloWorld.exe ``` Running the app should tell you the version and which user and machine build the assembly as well as the commit hash of the code @@ -133,7 +133,7 @@ at the time of building: ``` Hello World from Core 4.6.26210.0 @BuiltBy: adsitnik-MININT-O513E3V @SrcCode: https://github.com/dotnet/coreclr/tree/3d6da797d1f7dc47d5934189787a4e8006ab3a04 -The location is C:\coreclr\helloWorld\bin\Debug\netcoreapp2.1\win-x64\publish\System.Private.CoreLib.dll +The location is C:\coreclr\helloWorld\bin\Debug\netcoreapp3.0\win-x64\publish\System.Private.CoreLib.dll ``` **Congratulations! You have just run your first app against local CoreCLR build!** @@ -155,12 +155,12 @@ give it a value by setting the BuildNumberMinor environment variable. ```bat set BuildNumberMinor=3 ``` -before packaging. You should see this number show up in the version number (e.g. 2.1.0-preview1-26210-03). +before packaging. You should see this number show up in the version number (e.g. 3.0.0-preview1-26210-03). As an alternative you can delete the existing copy of the package from the Nuget cache. For example on windows (on Linux substitute ~/ for %HOMEPATH%) you could delete ```bat - %HOMEPATH%\.nuget\packages\runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR\2.1.0-preview1-26210-0 + %HOMEPATH%\.nuget\packages\runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR\3.0.0-preview1-26210-0 ``` which should make things work (but is fragile, confirm file timestamps that you are getting the version you expect) @@ -175,10 +175,10 @@ Get this by simply listing the name of the `runtime.win-x64.Microsoft.NETCore.Ru and you will get name of the which looks something like this ``` - runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR.2.1.0-preview1-26210-3.nupkg + runtime.win-x64.Microsoft.NETCore.Runtime.CoreCLR.3.0.0-preview1-26210-3.nupkg ``` -This gets us the version number, in the above case it is 2.1.0-preview1-26210-3. We will +This gets us the version number, in the above case it is 3.0.0-preview1-26210-3. We will use this in the next step. #### 3. Update the references to your runtime package @@ -187,12 +187,12 @@ Edit your `.csproj` file and change the versions: ``` - 2.1.0-preview1-26210-3 + 3.0.0-preview1-26210-3 - - + + ``` diff --git a/docs/coreclr/workflow/UsingYourBuild.md b/docs/coreclr/workflow/UsingYourBuild.md index 6a65399..2624e609 100644 --- a/docs/coreclr/workflow/UsingYourBuild.md +++ b/docs/coreclr/workflow/UsingYourBuild.md @@ -28,7 +28,7 @@ or always fully qualify the path to dotnet in the root of this folder for all th After setting up dotnet you can verify you are using the newer version by: -`dotnet --info` -- the version should be greater than 2.1.0-* +`dotnet --info` -- the version should be greater than 3.0.0-* For another small walkthrough see [Dogfooding .NET Core SDK](https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/dogfooding.md). @@ -55,16 +55,6 @@ shared framework. In order to do that you will need to add a `RuntimeIdentifier ``` For Windows you will want `win-x64`, for macOS `osx-x64` and `linux-x64` for Linux. -You might also need to explicitly specify a `PlatformTarget`: it shouldn't be required though, unless for some reason the default `PlatformTarget` on your machine, for that directory, is not `x64`. - -```xml - - ... - win-x64 - x64 - -``` - ### Publish Now is the time to publish. The publish step will trigger restore and build. You can iterate on build by calling `dotnet build` as @@ -79,10 +69,10 @@ dotnet publish 1. run `dotnet new nugetconfig` 2. go to the `NuGet.Config` file and add `` -After you publish you will find you all the binaries needed to run your application under `bin\Debug\netcoreapp2.1\win-x64\publish\`. +After you publish you will find you all the binaries needed to run your application under `bin\Debug\netcoreapp3.0\win-x64\publish\`. ``` -.\bin\Debug\netcoreapp2.1\win-x64\publish\HelloWorld.exe +.\bin\Debug\netcoreapp3.0\win-x64\publish\HelloWorld.exe ``` **But we are not done yet, you need to replace the published runtime files with the files from your local build!** @@ -101,7 +91,7 @@ you wish to update the DLLs. For example typically when you update CoreCLR you e * System.Private.CoreLib.dll - If you modified C# it will end up here. Thus after making a change and building, you can simply copy the updated binary from the `bin\Product\..` -directory to your publication directory (e.g. `helloWorld\bin\Debug\netcoreapp2.1\win-x64\publish`) to quickly +directory to your publication directory (e.g. `helloWorld\bin\Debug\netcoreapp3.0\win-x64\publish`) to quickly deploy your new bits. In a lot of cases it is easiest to just copy everything from here to your publication directory. You can build just the .NET Library part of the build by doing (debug, for release add 'release' qualifier) @@ -135,7 +125,7 @@ at the time of building: ``` Hello World from Core 4.6.26210.0 @BuiltBy: adsitnik-MININT-O513E3V @SrcCode: https://github.com/dotnet/coreclr/tree/3d6da797d1f7dc47d5934189787a4e8006ab3a04 -The location is C:\coreclr\helloWorld\bin\Debug\netcoreapp2.1\win-x64\publish\System.Private.CoreLib.dll +The location is C:\coreclr\helloWorld\bin\Debug\netcoreapp3.0\win-x64\publish\System.Private.CoreLib.dll ``` ## Using DotNetCli to run your .NET Core Application -- 2.7.4