Skip to content

Commit 000046f

Browse files
authored
Change netcoreapp5.0 to net5.0 (dotnet#35176)
* Change netcoreapp5.0 to net5.0 * Remove tfm downgrades * Rename S.R.CS.Unsfae include folder
1 parent f4acc94 commit 000046f

File tree

120 files changed

+359
-375
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+359
-375
lines changed

docs/coding-guidelines/adding-api-guidelines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ the implementation without compat concerns in future releases.
2424

2525
### Determine target framework
2626

27-
`netcoreapp5.0` is the target framework version currently under development and the new apis
28-
should be added to `netcoreapp5.0`. [More Information on TargetFrameworks](https://docs.microsoft.com/en-us/dotnet/standard/frameworks)
27+
`net5.0` is the target framework version currently under development and the new apis
28+
should be added to `net5.0`. [More Information on TargetFrameworks](https://docs.microsoft.com/en-us/dotnet/standard/frameworks)
2929

3030
## Making the changes in repo
3131

docs/coding-guidelines/project-guidelines.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Below is a list of all the various options we pivot the project builds on:
2828
## Individual build properties
2929
The following are the properties associated with each build pivot
3030

31-
- `$(BuildTargetFramework) -> netstandard2.1 | netcoreapp5.0 | net472`
31+
- `$(BuildTargetFramework) -> netstandard2.1 | net5.0 | net472`
3232
- `$(TargetOS) -> Windows | Linux | OSX | FreeBSD | [defaults to running OS when empty]`
3333
- `$(Configuration) -> Release | [defaults to Debug when empty]`
3434
- `$(TargetArchitecture) - x86 | x64 | arm | arm64 | [defaults to x64 when empty]`
@@ -82,7 +82,7 @@ When we have a project that has a `netstandard2.0` target framework that means t
8282
A full or individual project build is centered around BuildTargetFramework, TargetOS, Configuration and TargetArchitecture.
8383

8484
1. `$(BuildTargetFramework), $(TargetOS), $(Configuration), $(TargetArchitecture)` can individually be passed in to change the default values.
85-
2. If nothing is passed to the build then we will default value of these properties from the environment. Example: `netcoreapp5.0-[TargetOS Running On]-Debug-x64`.
85+
2. If nothing is passed to the build then we will default value of these properties from the environment. Example: `net5.0-[TargetOS Running On]-Debug-x64`.
8686
3. While Building an individual project from the VS, we build the project for all latest netcoreapp target frameworks.
8787

8888
We also have `RuntimeOS` which can be passed to customize the specific OS and version needed for native package builds as well as package restoration. If not passed it will default based on the OS you are running on.
@@ -121,7 +121,7 @@ The output for the ref project build will be a flat targeting pack folder in the
121121
## src
122122
In the src directory for a library there should be only **one** `.csproj` file that contains any information necessary to build the library in various target frameworks. All supported target frameworks should be listed in the `TargetFrameworks` property.
123123

124-
All libraries should use `<Reference Include="..." />` for all their project references. That will cause them to be resolved against a targeting pack (i.e. `bin\ref\netcoreapp5.0` or `\bin\ref\netstanard2.0`) based on the project target framework. There should not be any direct project references to other libraries. The only exception to that rule right now is for partial facades which directly reference System.Private.CoreLib and thus need to directly reference other partial facades to avoid type conflicts.
124+
All libraries should use `<Reference Include="..." />` for all their project references. That will cause them to be resolved against a targeting pack (i.e. `bin\ref\net5.0` or `\bin\ref\netstanard2.0`) based on the project target framework. There should not be any direct project references to other libraries. The only exception to that rule right now is for partial facades which directly reference System.Private.CoreLib and thus need to directly reference other partial facades to avoid type conflicts.
125125
<BR>//**CONSIDER**: just using Reference and use a reference to System.Private.CoreLib as a trigger to turn the other References into a ProjectReference automatically. That will allow us to have consistency where all projects just use Reference.
126126

127127
### src output

docs/design/coreclr/jit/viewing-jit-dumps.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The first thing to do is setup the .NET Core app we want to dump. Here are the s
2020

2121
<PropertyGroup>
2222
<OutputType>Exe</OutputType>
23-
<TargetFramework>netcoreapp5.0</TargetFramework>
23+
<TargetFramework>net5.0</TargetFramework>
2424
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
2525
</PropertyGroup>
2626

@@ -58,17 +58,17 @@ The first thing to do is setup the .NET Core app we want to dump. Here are the s
5858
}
5959
```
6060

61-
* After you've finished editing the code, run `dotnet restore` and `dotnet publish -c Release`. This should drop all of the binaries needed to run your app in `bin/Release/netcoreapp5.0/<rid>/publish`.
61+
* After you've finished editing the code, run `dotnet restore` and `dotnet publish -c Release`. This should drop all of the binaries needed to run your app in `bin/Release/net5.0/<rid>/publish`.
6262
* Overwrite the CLR dlls with the ones you've built locally. If you're a fan of the command line, here are some shell commands for doing this:
6363

6464
```shell
6565
# Windows
66-
robocopy /e <runtime-repo path>\artifacts\bin\coreclr\Windows_NT.<arch>.Release <app root>\bin\Release\netcoreapp5.0\<rid>\publish > NUL
67-
copy /y <runtime-repo path>\artifacts\bin\coreclr\Windows_NT.<arch>.Debug\clrjit.dll <app root>\bin\Release\netcoreapp5.0\<rid>\publish > NUL
66+
robocopy /e <runtime-repo path>\artifacts\bin\coreclr\Windows_NT.<arch>.Release <app root>\bin\Release\net5.0\<rid>\publish > NUL
67+
copy /y <runtime-repo path>\artifacts\bin\coreclr\Windows_NT.<arch>.Debug\clrjit.dll <app root>\bin\Release\net5.0\<rid>\publish > NUL
6868

6969
# Unix
70-
cp -rT <runtime-repo path>/artifacts/bin/coreclr/<OS>.<arch>.Release <app root>/bin/Release/netcoreapp5.0/<rid>/publish
71-
cp <runtime-repo path>/artifacts/bin/coreclr/<OS>.<arch>.Debug/libclrjit.so <app root>/bin/Release/netcoreapp5.0/<rid>/publish
70+
cp -rT <runtime-repo path>/artifacts/bin/coreclr/<OS>.<arch>.Release <app root>/bin/Release/net5.0/<rid>/publish
71+
cp <runtime-repo path>/artifacts/bin/coreclr/<OS>.<arch>.Debug/libclrjit.so <app root>/bin/Release/net5.0/<rid>/publish
7272
```
7373

7474
* Set the configuration knobs you need (see below) and run your published app. The info you want should be dumped to stdout.

docs/project/dogfooding.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ This is the default case for applications - running against an installed .NET ru
117117
```XML
118118
<PropertyGroup>
119119
<OutputType>Exe</OutputType>
120-
<!-- Ensure that the target framework is correct e.g. 'netcoreapp5.0' -->
121-
<TargetFramework>netcoreapp5.0</TargetFramework>
120+
<!-- Ensure that the target framework is correct e.g. 'net5.0' -->
121+
<TargetFramework>net5.0</TargetFramework>
122122
<!-- modify version in this line with one reported by `dotnet --info` under ".NET runtimes installed" -> Microsoft.NETCore.App -->
123123
<RuntimeFrameworkVersion>5.0.0-preview.1.20120.5</RuntimeFrameworkVersion>
124124
</PropertyGroup>
@@ -140,8 +140,8 @@ make it self-contained by adding a RuntimeIdentifier (RID).
140140
```XML
141141
<PropertyGroup>
142142
<OutputType>Exe</OutputType>
143-
<!-- Ensure that the target framework is correct e.g. 'netcoreapp5.0' -->
144-
<TargetFramework>netcoreapp5.0</TargetFramework>
143+
<!-- Ensure that the target framework is correct e.g. 'net5.0' -->
144+
<TargetFramework>net5.0</TargetFramework>
145145
<!-- modify build in this line with version reported by `dotnet --info` as above under ".NET runtimes installed" -> Microsoft.NETCore.App -->
146146
<!-- moreover, this can be any valid Microsoft.NETCore.App package version from https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json -->
147147
<RuntimeFrameworkVersion>5.0.0-preview.1.20120.5</RuntimeFrameworkVersion>
@@ -152,7 +152,7 @@ make it self-contained by adding a RuntimeIdentifier (RID).
152152
```
153153
$ dotnet restore
154154
$ dotnet publish
155-
$ bin\Debug\netcoreapp5.0\win-x64\publish\App.exe
155+
$ bin\Debug\net5.0\win-x64\publish\App.exe
156156
```
157157

158158
## More Advanced Scenario - Using your local CoreFx build

docs/workflow/building/libraries/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The libraries build has two logical components, the native build which produces
7474

7575
The build settings (BuildTargetFramework, TargetOS, Configuration, Architecture) are generally defaulted based on where you are building (i.e. which OS or which architecture) but we have a few shortcuts for the individual properties that can be passed to the build scripts:
7676

77-
- `-framework|-f` identifies the target framework for the build. Possible values include `netcoreapp5.0` (currently the latest .NET Core version) or `net472`. (msbuild property `BuildTargetFramework`)
77+
- `-framework|-f` identifies the target framework for the build. Possible values include `net5.0` (currently the latest .NET version) or `net472`. (msbuild property `BuildTargetFramework`)
7878
- `-os` identifies the OS for the build. It defaults to the OS you are running on but possible values include `Windows_NT`, `Unix`, `Linux`, or `OSX`. (msbuild property `TargetOS`)
7979
- `-configuration|-c Debug|Release` controls the optimization level the compilers use for the build. It defaults to `Debug`. (msbuild property `Configuration`)
8080
- `-arch` identifies the architecture for the build. It defaults to `x64` but possible values include `x64`, `x86`, `arm`, or `arm64`. (msbuild property `TargetArchitecture`)
@@ -98,7 +98,7 @@ By default the `build` script only builds the product libraries and none of the
9898

9999
- Building for different target frameworks (restore and build are implicit again as no action is passed in)
100100
```bash
101-
./build.sh -subset libs -framework netcoreapp5.0
101+
./build.sh -subset libs -framework net5.0
102102
./build.sh -subset libs -framework net472
103103
```
104104

docs/workflow/building/libraries/code-coverage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ This runs the tests and generates the full code coverage report. The resulting i
3636

3737
You can also build and test with code coverage for a particular test project rather than for the whole repo with the `/p:Coverage=true` property:
3838

39-
dotnet test -f netcoreapp5.0 /p:Coverage=true
39+
dotnet test -f net5.0 /p:Coverage=true
4040

4141
The results for this one library will then be available in this index.htm file, where $(OutDir) is the directory where the binaries were generated.
4242

4343
$(OutDir)\report\index.htm
4444

4545
For example, to build, test, and get code coverage results for the System.Diagnostics.Debug library, from the root of the repo one can do:
4646

47-
dotnet test src\libraries\System.Diagnostics.Debug -f netcoreapp5.0 /p:Coverage=true
47+
dotnet test src\libraries\System.Diagnostics.Debug -f net5.0 /p:Coverage=true
4848

4949
And then once the run completes:
5050

docs/workflow/building/libraries/cross-building.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ You can also build just managed code with:
8585

8686
$ ./build.sh --arch arm /p:BuildNative=false
8787

88-
The output is at `artifacts/bin/[BuildSettings]` where `BuildSettings` looks something like `netcoreapp5.0-<TargetOS>-Debug-<Architecture>`. Ex: `artifacts/bin/netcoreapp5.0-Linux-Debug-x64`. For more details on the build configurations see [project-guidelines](/docs/coding-guidelines/project-guidelines.md)
88+
The output is at `artifacts/bin/[BuildSettings]` where `BuildSettings` looks something like `net5.0-<TargetOS>-Debug-<Architecture>`. Ex: `artifacts/bin/net5.0-Linux-Debug-x64`. For more details on the build configurations see [project-guidelines](/docs/coding-guidelines/project-guidelines.md)
8989

9090
Building corefx for Linux ARM Emulator
9191
=======================================
@@ -118,14 +118,14 @@ When building for a new architecture you will need to build the native pieces se
118118
Example building for armel
119119
```
120120
src/Native/build-native.sh armel
121-
--> Output goes to artifacts/bin/runtime/netcoreapp5.0-Linux-Debug-armel
121+
--> Output goes to artifacts/bin/runtime/net5.0-Linux-Debug-armel
122122
123123
build /p:TargetArchitecture=x64 /p:BuildNative=false
124-
--> Output goes to artifacts/bin/runtime/netcoreapp5.0-Linux-Debug-x64
124+
--> Output goes to artifacts/bin/runtime/net5.0-Linux-Debug-x64
125125
```
126126

127127
The reason you need to build the managed portion for x64 is because it depends on runtime packages for the new architecture which don't exist yet so we use another existing architecture such as x64 as a proxy for building the managed binaries.
128128

129-
Similar if you want to try and run tests you will have to copy the managed assemblies from the proxy directory (i.e. `netcoreapp5.0-Linux-Debug-x64`) to the new architecture directory (i.e `netcoreapp5.0-Linux-Debug-armel`) and run code via another host such as corerun because dotnet is at a higher level and most likely doesn't exist for the new architecture yet.
129+
Similar if you want to try and run tests you will have to copy the managed assemblies from the proxy directory (i.e. `net5.0-Linux-Debug-x64`) to the new architecture directory (i.e `net5.0-Linux-Debug-armel`) and run code via another host such as corerun because dotnet is at a higher level and most likely doesn't exist for the new architecture yet.
130130

131131
Once all the necessary builds are setup and packages are published the splitting of the build and manual creation of the runtime should no longer be necessary.

docs/workflow/testing/libraries/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ dotnet build /t:Test /p:Outerloop=true
5959

6060
#### Running tests on a different target framework
6161

62-
Each test project can potentially have multiple target frameworks. There are some tests that might be OS-specific, or might be testing an API that is available only on some target frameworks, so the `TargetFrameworks` property specifies the valid target frameworks. By default we will build and run only the default build target framework which is `netcoreapp5.0`. The rest of the `TargetFrameworks` will need to be built and ran by specifying the `BuildTargetFramework` option, e.g.:
62+
Each test project can potentially have multiple target frameworks. There are some tests that might be OS-specific, or might be testing an API that is available only on some target frameworks, so the `TargetFrameworks` property specifies the valid target frameworks. By default we will build and run only the default build target framework which is `net5.0`. The rest of the `TargetFrameworks` will need to be built and ran by specifying the `BuildTargetFramework` option, e.g.:
6363
```cmd
6464
dotnet build src\libraries\System.Runtime\tests\System.Runtime.Tests.csproj /p:BuildTargetFramework=net472
6565
```

eng/Configurations.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<PropertyGroup>
2020
<NETCoreAppCurrentVersion>5.0</NETCoreAppCurrentVersion>
2121
<NetCoreAppCurrentTargetFrameworkMoniker>.NETCoreApp,Version=v$(NETCoreAppCurrentVersion)</NetCoreAppCurrentTargetFrameworkMoniker>
22-
<NetCoreAppCurrent>netcoreapp$(NETCoreAppCurrentVersion)</NetCoreAppCurrent>
22+
<NetCoreAppCurrent>net$(NETCoreAppCurrentVersion)</NetCoreAppCurrent>
2323
<NetFrameworkCurrent>net472</NetFrameworkCurrent>
2424
<SharedFrameworkName>Microsoft.NETCore.App</SharedFrameworkName>
2525
</PropertyGroup>

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<!-- Max version of NETCoreApp, used by test projects. -->
2727
<NETCoreAppMaximumVersion>$(MajorVersion).$(MinorVersion)</NETCoreAppMaximumVersion>
2828
<NETCoreAppFrameworkVersion>$(MajorVersion).$(MinorVersion)</NETCoreAppFrameworkVersion>
29-
<NETCoreAppFramework>netcoreapp$(NETCoreAppFrameworkVersion)</NETCoreAppFramework>
29+
<NETCoreAppFramework>net$(NETCoreAppFrameworkVersion)</NETCoreAppFramework>
3030
<!--
3131
The NETStandard.Library targeting pack uses this patch version, which does not match the
3232
runtime's. After publishing a new version of the NETStandard targeting pack in a servicing

0 commit comments

Comments
 (0)