Update 'net7.0' usages in the repo
authorViktor Hofer <viktor.hofer@microsoft.com>
Fri, 18 Nov 2022 20:24:56 +0000 (21:24 +0100)
committerViktor Hofer <viktor.hofer@microsoft.com>
Fri, 18 Nov 2022 20:24:56 +0000 (21:24 +0100)
17 files changed:
docs/workflow/building/libraries/cross-building.md
docs/workflow/debugging/coreclr/debugging-runtime.md
docs/workflow/testing/using-dev-shipping-packages.md
docs/workflow/testing/using-your-build-with-installed-sdk.md
src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/PathUtilities.cs
src/installer/tests/Assets/TestUtils/TestProjects.props
src/installer/tests/TestUtils/Constants.cs
src/libraries/Common/tests/StaticTestGenerator/Program.cs
src/libraries/Microsoft.Internal.Runtime.AspNetCore.Transport/src/Microsoft.Internal.Runtime.AspNetCore.Transport.proj
src/libraries/Microsoft.NET.WebAssembly.Threading/src/Microsoft.NET.WebAssembly.Threading.proj
src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.props
src/libraries/System.Net.Http/tests/StressTests/HttpStress/Directory.Build.targets
src/libraries/System.Net.Security/tests/StressTests/SslStress/Directory.Build.props
src/libraries/System.Net.Security/tests/StressTests/SslStress/Directory.Build.targets
src/libraries/System.Text.Json/src/System/ReflectionExtensions.cs
src/libraries/System.Text.RegularExpressions/tools/GenerateRegexCasingTable.csproj
src/native/libs/build-native.sh

index c1f6af6..5111834 100644 (file)
@@ -46,30 +46,30 @@ To build native runtime libraries for arm:
 
     $ ROOTFS_DIR=`pwd`/.tools/rootfs/arm ./build.sh libs.native --cross --arch arm --librariesConfiguration Release
 
-Build artifacts can be found in `artifacts/bin/native/net7.0-<TargetOS>-<BuildArch>-<BuildType>/`:
-
-    $ ls artifacts/bin/native/net7.0-Linux-Release-arm/*
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.Globalization.Native.a
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.Globalization.Native.so
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.Globalization.Native.so.dbg
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.IO.Compression.Native.a
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.IO.Compression.Native.so
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.IO.Compression.Native.so.dbg
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.IO.Ports.Native.a
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.IO.Ports.Native.so
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.IO.Ports.Native.so.dbg
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.Native.a
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.Native.so
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.Native.so.dbg
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.Net.Security.Native.a
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.Net.Security.Native.so
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.Net.Security.Native.so.dbg
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.Security.Cryptography.Native.OpenSsl.a
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.Security.Cryptography.Native.OpenSsl.so
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.Security.Cryptography.Native.OpenSsl.so.dbg
-
-    $ file artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.Native.so
-    artifacts/bin/native/net7.0-Linux-Release-arm/libSystem.Native.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=5f6f6f9c4012dffed133624867adf32ac2af130d, stripped
+Build artifacts can be found in `artifacts/bin/native/net8.0-<TargetOS>-<BuildArch>-<BuildType>/`:
+
+    $ ls artifacts/bin/native/net8.0-Linux-Release-arm/*
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.Globalization.Native.a
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.Globalization.Native.so
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.Globalization.Native.so.dbg
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.IO.Compression.Native.a
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.IO.Compression.Native.so
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.IO.Compression.Native.so.dbg
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.IO.Ports.Native.a
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.IO.Ports.Native.so
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.IO.Ports.Native.so.dbg
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.Native.a
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.Native.so
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.Native.so.dbg
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.Net.Security.Native.a
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.Net.Security.Native.so
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.Net.Security.Native.so.dbg
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.Security.Cryptography.Native.OpenSsl.a
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.Security.Cryptography.Native.OpenSsl.so
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.Security.Cryptography.Native.OpenSsl.so.dbg
+
+    $ file artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.Native.so
+    artifacts/bin/native/net8.0-Linux-Release-arm/libSystem.Native.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=5f6f6f9c4012dffed133624867adf32ac2af130d, stripped
 
 
 Compile managed runtime libraries on Linux
@@ -88,7 +88,7 @@ Note that by default ILLinker trimming is enabled and libraries built above for
 
     $ ./build.sh libs.sfx --arch arm --librariesConfiguration Release /p:ILLinkTrimAssembly=false
 
-Build artifacts can be found in `artifacts/bin/microsoft.netcore.app.runtime.<TargetOS>-<BuildArch>/<BuildType>/runtimes/<TargetOS>-<BuildArch>/lib/net7.0/`. For more details on the build configurations see [project-guidelines](/docs/coding-guidelines/project-guidelines.md).
+Build artifacts can be found in `artifacts/bin/microsoft.netcore.app.runtime.<TargetOS>-<BuildArch>/<BuildType>/runtimes/<TargetOS>-<BuildArch>/lib/net8.0/`. For more details on the build configurations see [project-guidelines](/docs/coding-guidelines/project-guidelines.md).
 
 Both native and managed runtime libraries can be built at the same time with:
 
index c26eabe..db320f7 100644 (file)
@@ -53,7 +53,7 @@ Visual Studio's capabilities as a full IDE provide a lot of help making the runt
 5. Set `Command=$(SolutionDir)\..\..\..\..\bin\coreclr\windows.$(Platform).$(Configuration)\corerun.exe`. This points to the folder where the built runtime binaries are present.
 6. Set `Command Arguments=<managed app you wish to run>` (e.g. HelloWorld.dll).
 7. Set `Working Directory=$(SolutionDir)\..\..\..\..\bin\coreclr\windows.$(Platform).$(Configuration)`. This points to the folder containing CoreCLR binaries.
-8. Set `Environment=CORE_LIBRARIES=$(SolutionDir)\..\..\..\..\bin\runtime\<target-framework>-windows-$(Configuration)-$(Platform)`, where '\<target-framework\>' is the target framework of current branch; for example `netcoreapp3.1` `net5.0`, `net6.0`, or `net7.0`. A few notes on this step:
+8. Set `Environment=CORE_LIBRARIES=$(SolutionDir)\..\..\..\..\bin\runtime\<target-framework>-windows-$(Configuration)-$(Platform)`, where '\<target-framework\>' is the target framework of current branch; for example `net6.0`, `net7.0` or `net8.0`. A few notes on this step:
 
 * This points to the folder containing core libraries except `System.Private.CoreLib`.
 * This step can be skipped if you are debugging CLR tests that reference only `System.Private.CoreLib`. Otherwise, it's required to debug a real-world application that references anything else, including `System.Runtime`.
@@ -83,7 +83,7 @@ Steps 1-9 only need to be done once as long as there's been no changes to the CM
         },
         {
           "name": "CORE_LIBRARIES",
-          // for example net7.0-windows-Debug-x64
+          // for example net8.0-windows-Debug-x64
           "value": "${cmake.installRoot}\\..\\..\\runtime\\<tfm>-windows-<configuration>-<arch>\\"
         }
       ],
index a7d2aee..6510b43 100644 (file)
@@ -127,11 +127,9 @@ Running this little app should yield an output like the following:
 
 ```text
 Hello World from .NET 8.0.0-dev
-The location of System.Private.CoreLib.dll is '/path/to/your/app/bin/Debug/net7.0/win-x64/publish/System.Private.CoreLib.dll'
+The location of System.Private.CoreLib.dll is '/path/to/your/app/bin/Debug/net8.0/win-x64/publish/System.Private.CoreLib.dll'
 ```
 
-You might be wondering why it says `net7.0` if we are using an `8.0.0` SDK. At the time of writing, we are still preparing all that's needed to fully migrate development to .NET 8. In the not so distant future, the path should be `net8.0` as you might expect, and this doc will be updated accordingly.
-
 ## Making Changes and Consuming Updated Packages
 
 You've now successfully tested your runtime build. However, more likely than not, you will be making further changes that you'll want to test. The issue here is you can't simply build the repo again and have it work. This is because of the _NuGet Cache_ mentioned earlier. Since the version number doesn't change locally, NuGet doesn't realize changes have been made and thus uses its cached version. To get around this, we have to get rid of such cache. That's why we set a local one using the `globalPackagesFolder` in the `nuget.config` file we created.
index f55b21f..a2716ea 100644 (file)
@@ -93,7 +93,7 @@ dotnet publish --self-contained
 </configuration>
 ```
 
-After you publish successfully, you will find all the binaries needed to run your application under `bin\Debug\net7.0\win-x64\publish`. You might be wondering why `net7.0` if we are using an `8.0.100` SDK. At the time of writing, we are still preparing all that's needed to fully migrate development to .NET 8. In the not so distant future, the path should be `net8.0` as you might expect, and this doc will be updated accordingly.
+After you publish successfully, you will find all the binaries needed to run your application under `bin\Debug\net8.0\win-x64\publish`.
 
 **But we are not done yet, you need to replace the published runtime files with the files from your local build!**
 
@@ -105,12 +105,12 @@ The publishing step described above creates a directory that has all the files n
 * `System.Private.CoreLib.dll`: If you modified managed C# code, it will end up here.
 * `clrjit.dll`: The JIT compiler. It is also required you copy this one to your published app.
 
-Now, here comes the main deal to test your build. Once you have your self-contained app published, and CoreCLR built, you will replace the binaries listed above with the generated artifacts. Copy them from `artifacts/bin/coreclr/<OS>.<arch>.<configuration>/` to your app's publication directory, which by default is `your-app-folder/bin/<configuration>/net7.0/<os-code>-<arch>/publish`.
+Now, here comes the main deal to test your build. Once you have your self-contained app published, and CoreCLR built, you will replace the binaries listed above with the generated artifacts. Copy them from `artifacts/bin/coreclr/<OS>.<arch>.<configuration>/` to your app's publication directory, which by default is `your-app-folder/bin/<configuration>/net8.0/<os-code>-<arch>/publish`.
 
 In our previous example this would be:
 
 * From: `artifacts/bin/coreclr/windows.x64.Debug/`
-* To: `HelloWorld/bin/Debug/net7.0/win-x64/publish/`
+* To: `HelloWorld/bin/Debug/net8.0/win-x64/publish/`
 
 ## Confirm that the app used your new runtime (Optional)
 
@@ -130,7 +130,7 @@ That should tell you the version, and which user and machine built the assembly,
 
 ```text
 Core Runtime Info: 8.0.0-dev
-System.Private.CoreLib.dll is located at: /path/to/your/app/bin/Debug/net7.0/win-x64/publish/System.Private.CoreLib.dll
+System.Private.CoreLib.dll is located at: /path/to/your/app/bin/Debug/net8.0/win-x64/publish/System.Private.CoreLib.dll
 ```
 
 What you are looking for here is that the core runtime used is labelled as `-dev`. This means it is indeed using the one you built in the runtime repo. Also, ensure that the picked _System.Private.CoreLib.dll_ is indeed the one in your `publish` folder.
@@ -144,7 +144,7 @@ Here are a few very common errors you might encounter, and how to fix them.
 Make sure you are running the executable directly.
 
 ```cmd
-.\bin\Debug\net7.0\win-x64\publish\HelloWorld.exe
+.\bin\Debug\net8.0\win-x64\publish\HelloWorld.exe
 ```
 
 If you use `dotnet run` it will overwrite your custom binaries before executing the app.
index 915da2a..461e7e1 100644 (file)
@@ -9,7 +9,9 @@ namespace Mono.Linker.Tests.TestCasesRunner
 {
        public static class PathUtilities
        {
-#if NET7_0
+#if NET8_0
+        public const string TFMDirectoryName = "net8.0";
+#elif NET7_0
                public const string TFMDirectoryName = "net7.0";
 #elif NET6_0
                public const string TFMDirectoryName = "net6.0";
index 33ab2ba..8ee010f 100644 (file)
@@ -5,7 +5,7 @@
   -->
 
   <PropertyGroup>
-    <NetCoreAppCurrent>net7.0</NetCoreAppCurrent>
+    <NetCoreAppCurrent>net8.0</NetCoreAppCurrent>
     <!-- Turn off end of life target framework checks as we intentionally build older .NETCoreApp configurations. -->
     <CheckEolTargetFramework>false</CheckEolTargetFramework>
     <!--
index f7c8cbe..bba6b13 100644 (file)
@@ -38,6 +38,7 @@ namespace Microsoft.DotNet.CoreSetup.Test
             public const string RuntimeConfigPropertyName = "tfm";
             public const string Net6 = "net6.0";
             public const string Net7 = "net7.0";
+            public const string Net8 = "net8.0";
         }
 
         public static class FxVersion
index f5c2e72..8154590 100644 (file)
@@ -274,7 +274,7 @@ namespace StaticTestGenerator
             // Invalid command line arguments.
             Console.WriteLine("Usage: <output_directory> <helper_assemblies_directory> <test_assembly_path> <xunit_console_options>");
             Console.WriteLine("    Example:");
-            Console.WriteLine(@"   dotnet run d:\tmpoutput d:\repos\runtime\artifacts\bin\testhost\net7.0-windows-Debug-x64\shared\Microsoft.NETCore.App\7.0.0\ d:\repos\runtime\artifacts\bin\System.Runtime.Tests\net7.0-windows-Debug\System.Runtime.Tests.dll");
+            Console.WriteLine(@"   dotnet run d:\tmpoutput d:\repos\runtime\artifacts\bin\testhost\net8.0-windows-Debug-x64\shared\Microsoft.NETCore.App\8.0.0\ d:\repos\runtime\artifacts\bin\System.Runtime.Tests\net8.0-windows-Debug\System.Runtime.Tests.dll");
             testAssemblyPath = string.Empty;
             runtimeAssembliesPath = string.Empty;
             outputPath = string.Empty;
index 821ac03..58ae07a 100644 (file)
@@ -26,7 +26,7 @@
                       PrivateAssets="all"
                       Private="true"
                       IncludeReferenceAssemblyInPackage="true" />
-    <!-- Only include the 4.4 version in the ref pack, since targeting net7.0 requires Roslyn 4.4 -->
+    <!-- Only include the 4.4 version in the ref pack, since targeting net7.0 or greater requires Roslyn 4.4 -->
     <AnalyzerReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.4.csproj"
                        Pack="true"
                        ReferenceAnalyzer="false" />
index 49f8632..5ba07a9 100644 (file)
@@ -8,7 +8,7 @@
     <IsPackable>true</IsPackable>
     <PackageDescription>Exposes Threading APIs for WebAssembly projects</PackageDescription>
     <!-- 
-      NU5128 suppresses missing net7.0 dependencies.
+      NU5128 suppresses missing $(NetCoreAppCurrent) dependencies.
       PKV004 suppresses APICompat rule for missing runtime asset.
      -->
     <NoWarn>$(NoWarn);NU5128;NU5131;PKV004</NoWarn>
index 479a4c6..9ca3583 100644 (file)
@@ -8,8 +8,8 @@
         
         <TargetingPacksTargetsLocation Condition="'$(TargetingPacksTargetsLocation)' == ''">$(RepositoryRoot)eng/targetingpacks.targets</TargetingPacksTargetsLocation>
         <ProductVersion>8.0.0</ProductVersion>
-        <NetCoreAppCurrent>net7.0</NetCoreAppCurrent>
-        <NetCoreAppCurrentVersion>7.0</NetCoreAppCurrentVersion>
+        <NetCoreAppCurrent>net8.0</NetCoreAppCurrent>
+        <NetCoreAppCurrentVersion>8.0</NetCoreAppCurrentVersion>
         <MicrosoftNetCoreAppFrameworkName>Microsoft.NETCore.App</MicrosoftNetCoreAppFrameworkName>
         <MicrosoftNetCoreAppRefPackDir Condition="'$(MicrosoftNetCoreAppRefPackDir)' == ''" >$(RepositoryRoot)artifacts/bin/microsoft.netcore.app.ref/</MicrosoftNetCoreAppRefPackDir>
         <MicrosoftNetCoreAppRuntimePackDir Condition="'$(MicrosoftNetCoreAppRuntimePackDir)' == ''">$(RepositoryRoot)artifacts/bin/microsoft.netcore.app.runtime.$(OutputRid)/$(Configuration)/</MicrosoftNetCoreAppRuntimePackDir>
index 85e81c5..e3ebd0d 100644 (file)
@@ -6,6 +6,6 @@
       Define this here because the SDK resets it
       unconditionally in Microsoft.NETCoreSdk.BundledVersions.props.
     -->
-    <NETCoreAppMaximumVersion>7.0</NETCoreAppMaximumVersion>
+    <NETCoreAppMaximumVersion>8.0</NETCoreAppMaximumVersion>
   </PropertyGroup>
 </Project>
\ No newline at end of file
index db81297..70928e5 100644 (file)
@@ -8,8 +8,8 @@
 
         <TargetingPacksTargetsLocation Condition="'$(TargetingPacksTargetsLocation)' == ''">$(RepositoryRoot)eng/targetingpacks.targets</TargetingPacksTargetsLocation>
         <ProductVersion>8.0.0</ProductVersion>
-        <NetCoreAppCurrent>net7.0</NetCoreAppCurrent>
-        <NetCoreAppCurrentVersion>7.0</NetCoreAppCurrentVersion>
+        <NetCoreAppCurrent>net8.0</NetCoreAppCurrent>
+        <NetCoreAppCurrentVersion>8.0</NetCoreAppCurrentVersion>
         <MicrosoftNetCoreAppFrameworkName>Microsoft.NETCore.App</MicrosoftNetCoreAppFrameworkName>
         <MicrosoftNetCoreAppRefPackDir Condition="'$(MicrosoftNetCoreAppRefPackDir)' == ''" >$(RepositoryRoot)artifacts/bin/microsoft.netcore.app.ref/</MicrosoftNetCoreAppRefPackDir>
         <MicrosoftNetCoreAppRuntimePackDir Condition="'$(MicrosoftNetCoreAppRuntimePackDir)' == ''">$(RepositoryRoot)artifacts/bin/microsoft.netcore.app.runtime.$(OutputRid)/$(Configuration)/</MicrosoftNetCoreAppRuntimePackDir>
index 85e81c5..e3ebd0d 100644 (file)
@@ -6,6 +6,6 @@
       Define this here because the SDK resets it
       unconditionally in Microsoft.NETCoreSdk.BundledVersions.props.
     -->
-    <NETCoreAppMaximumVersion>7.0</NETCoreAppMaximumVersion>
+    <NETCoreAppMaximumVersion>8.0</NETCoreAppMaximumVersion>
   </PropertyGroup>
 </Project>
\ No newline at end of file
index a89745d..c9ace15 100644 (file)
@@ -46,7 +46,7 @@ namespace System.Text.Json.Reflection
         public static bool HasRequiredMemberAttribute(this ICustomAttributeProvider memberInfo)
         {
             // For compiler related attributes we should only look at full type name rather than trying to do something different for version when attribute was introduced.
-            // I.e. library is targetting netstandard2.0 with polyfilled attributes and is being consumed by app targetting net7.0.
+            // I.e. library is targeting netstandard2.0 with polyfilled attributes and is being consumed by an app targeting net7.0 or greater.
             return memberInfo.HasCustomAttributeWithName("System.Runtime.CompilerServices.RequiredMemberAttribute", inherit: true);
         }
 
index 173f255..9e72126 100644 (file)
@@ -2,6 +2,7 @@
 
   <PropertyGroup>
       <OutputType>Exe</OutputType>
+      <!-- SDK maximum supported version. -->
       <TargetFramework>net7.0</TargetFramework>
       <Nullable>enable</Nullable>
   </PropertyGroup>
index d93bffe..e6d7f31 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 
-usage_list=("-outconfig: Configuration, typically a quadruplet such as 'net7.0-Linux-Release-x64', used to name output directory.")
+usage_list=("-outconfig: Configuration, typically a quadruplet such as 'net8.0-Linux-Release-x64', used to name output directory.")
 usage_list+=("-staticLibLink: Optional argument to statically link any native library.")
 
 __scriptpath="$(cd "$(dirname "$0")"; pwd -P)"