Skip to content

Commit d74b557

Browse files
Copilotdanroth27
andcommitted
Fix .NET Core 3.x naming - restore .NET Core naming for 3.x and earlier versions
Co-authored-by: danroth27 <1874516+danroth27@users.noreply.github.com>
1 parent 4e55f76 commit d74b557

24 files changed

Lines changed: 49 additions & 49 deletions

File tree

aspnetcore/fundamentals/target-aspnetcore.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ As preview releases of ASP.NET Core are made available, breaking changes are pos
2424

2525
## Use the ASP.NET Core shared framework
2626

27-
With the release of .NET 3.0, many ASP.NET Core assemblies are no longer published to NuGet as packages. Instead, the assemblies are included in the `Microsoft.AspNetCore.App` shared framework, which is installed with the .NET SDK and runtime installers. For a list of packages no longer being published, see [Remove obsolete package references](xref:migration/22-to-30#remove-obsolete-package-references).
27+
With the release of .NET Core 3.0, many ASP.NET Core assemblies are no longer published to NuGet as packages. Instead, the assemblies are included in the `Microsoft.AspNetCore.App` shared framework, which is installed with the .NET SDK and runtime installers. For a list of packages no longer being published, see [Remove obsolete package references](xref:migration/22-to-30#remove-obsolete-package-references).
2828

29-
As of .NET 3.0, projects using the `Microsoft.NET.Sdk.Web` MSBuild SDK implicitly reference the shared framework. Projects using the `Microsoft.NET.Sdk` or `Microsoft.NET.Sdk.Razor` SDK must reference ASP.NET Core to use ASP.NET Core APIs in the shared framework.
29+
As of .NET Core 3.0, projects using the `Microsoft.NET.Sdk.Web` MSBuild SDK implicitly reference the shared framework. Projects using the `Microsoft.NET.Sdk` or `Microsoft.NET.Sdk.Razor` SDK must reference ASP.NET Core to use ASP.NET Core APIs in the shared framework.
3030

3131
To reference ASP.NET Core, add the following `<FrameworkReference>` element to your project file:
3232

@@ -114,7 +114,7 @@ This section doesn't discuss multi-targeting to support multiple versions of MVC
114114

115115
A project that includes [Razor views](xref:mvc/views/overview) or [Razor Pages](xref:razor-pages/index) must use the [Microsoft.NET.Sdk.Razor SDK](xref:razor-pages/sdk).
116116

117-
If the project targets .NET 3.x, it requires:
117+
If the project targets .NET Core 3.x, it requires:
118118

119119
* An `AddRazorSupportForMvc` MSBuild property set to `true`.
120120
* A `<FrameworkReference>` element for the shared framework.
@@ -145,7 +145,7 @@ If the project targets .NET Standard instead, a [Microsoft.AspNetCore.Mvc](https
145145

146146
### Tag Helpers
147147

148-
A project that includes [Tag Helpers](xref:mvc/views/tag-helpers/intro) should use the `Microsoft.NET.Sdk` SDK. If targeting .NET 3.x, add a `<FrameworkReference>` element for the shared framework. For example:
148+
A project that includes [Tag Helpers](xref:mvc/views/tag-helpers/intro) should use the `Microsoft.NET.Sdk` SDK. If targeting .NET Core 3.x, add a `<FrameworkReference>` element for the shared framework. For example:
149149

150150
[!code-xml[](target-aspnetcore/samples/single-tfm/netcoreapp3.1-basic-library.csproj)]
151151

@@ -155,7 +155,7 @@ If targeting .NET Standard (to support versions earlier than ASP.NET Core 3.x),
155155

156156
### View components
157157

158-
A project that includes [View components](xref:mvc/views/view-components) should use the `Microsoft.NET.Sdk` SDK. If targeting .NET 3.x, add a `<FrameworkReference>` element for the shared framework. For example:
158+
A project that includes [View components](xref:mvc/views/view-components) should use the `Microsoft.NET.Sdk` SDK. If targeting .NET Core 3.x, add a `<FrameworkReference>` element for the shared framework. For example:
159159

160160
[!code-xml[](target-aspnetcore/samples/single-tfm/netcoreapp3.1-basic-library.csproj)]
161161

@@ -169,7 +169,7 @@ Multi-targeting is required to author a library that supports multiple variants
169169

170170
* ASP.NET Core 2.1 targeting .NET Framework 4.6.1
171171
* ASP.NET Core 2.x targeting .NET 2.x
172-
* ASP.NET Core 3.x targeting .NET 3.x
172+
* ASP.NET Core 3.x targeting .NET Core 3.x
173173

174174
The following project file supports these variants via the `TargetFrameworks` property:
175175

@@ -179,7 +179,7 @@ With the preceding project file:
179179

180180
* The `Markdig` package is added for all consumers.
181181
* A reference to [Microsoft.AspNetCore.Mvc.Razor](https://www.nuget.org/packages/Microsoft.AspNetCore.Mvc.Razor) is added for consumers targeting .NET Framework 4.6.1 or later or .NET 2.x. Version 2.1.0 of the package works with ASP.NET Core 2.2 because of backwards compatibility.
182-
* The shared framework is referenced for consumers targeting .NET 3.x. The `Microsoft.AspNetCore.Mvc.Razor` package is included in the shared framework.
182+
* The shared framework is referenced for consumers targeting .NET Core 3.x. The `Microsoft.AspNetCore.Mvc.Razor` package is included in the shared framework.
183183

184184
Alternatively, .NET Standard 2.0 could be targeted instead of targeting both .NET 2.1 and .NET Framework 4.6.1:
185185

@@ -194,20 +194,20 @@ If your library needs to call platform-specific APIs, target specific .NET imple
194194

195195
## Use an API that hasn't changed
196196

197-
Imagine a scenario in which you're upgrading a middleware library from .NET 2.2 to 3.1. The ASP.NET Core middleware APIs being used in the library haven't changed between ASP.NET Core 2.2 and 3.1. To continue supporting the middleware library in .NET 3.1, take the following steps:
197+
Imagine a scenario in which you're upgrading a middleware library from .NET Core 2.2 to 3.1. The ASP.NET Core middleware APIs being used in the library haven't changed between ASP.NET Core 2.2 and 3.1. To continue supporting the middleware library in .NET Core 3.1, take the following steps:
198198

199199
* Follow the [standard library guidance](/dotnet/standard/library-guidance/).
200200
* Add a package reference for each API's NuGet package if the corresponding assembly doesn't exist in the shared framework.
201201

202202
## Use an API that changed
203203

204-
Imagine a scenario in which you're upgrading a library from .NET 2.2 to .NET 3.1. An ASP.NET Core API being used in the library has a [breaking change](/dotnet/core/compatibility/breaking-changes) in ASP.NET Core 3.1. Consider whether the library can be rewritten to not use the broken API in all versions.
204+
Imagine a scenario in which you're upgrading a library from .NET Core 2.2 to .NET Core 3.1. An ASP.NET Core API being used in the library has a [breaking change](/dotnet/core/compatibility/breaking-changes) in ASP.NET Core 3.1. Consider whether the library can be rewritten to not use the broken API in all versions.
205205

206206
If you can rewrite the library, do so and continue to target an earlier target framework (for example, .NET Standard 2.0 or .NET Framework 4.6.1) with package references.
207207

208208
If you can't rewrite the library, take the following steps:
209209

210-
* Add a target for .NET 3.1.
210+
* Add a target for .NET Core 3.1.
211211
* Add a `<FrameworkReference>` element for the shared framework.
212212
* Use the [#if preprocessor directive](/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-if) with the appropriate target framework symbol to conditionally compile code.
213213

@@ -224,16 +224,16 @@ Imagine that you want to use an ASP.NET Core API that was introduced in ASP.NET
224224

225225
If the library functionally requires the API and there's no way to implement it down-level:
226226

227-
* Target .NET 3.x only.
227+
* Target .NET Core 3.x only.
228228
* Add a `<FrameworkReference>` element for the shared framework.
229229

230230
If the library can implement the feature in a different way:
231231

232-
* Add .NET 3.x as a target framework.
232+
* Add .NET Core 3.x as a target framework.
233233
* Add a `<FrameworkReference>` element for the shared framework.
234234
* Use the [#if preprocessor directive](/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-if) with the appropriate target framework symbol to conditionally compile code.
235235

236-
For example, the following Tag Helper uses the <xref:Microsoft.AspNetCore.Hosting.IWebHostEnvironment> interface introduced in ASP.NET Core 3.1. Consumers targeting .NET 3.1 execute the code path defined by the `NETCOREAPP3_1` target framework symbol. The Tag Helper's constructor parameter type changes to <xref:Microsoft.AspNetCore.Hosting.IHostingEnvironment> for .NET 2.1 and .NET Framework 4.6.1 consumers. This change was necessary because ASP.NET Core 3.1 marked `IHostingEnvironment` as obsolete and recommended `IWebHostEnvironment` as the replacement.
236+
For example, the following Tag Helper uses the <xref:Microsoft.AspNetCore.Hosting.IWebHostEnvironment> interface introduced in ASP.NET Core 3.1. Consumers targeting .NET Core 3.1 execute the code path defined by the `NETCOREAPP3_1` target framework symbol. The Tag Helper's constructor parameter type changes to <xref:Microsoft.AspNetCore.Hosting.IHostingEnvironment> for .NET Core 2.1 and .NET Framework 4.6.1 consumers. This change was necessary because ASP.NET Core 3.1 marked `IHostingEnvironment` as obsolete and recommended `IWebHostEnvironment` as the replacement.
237237

238238
```csharp
239239
[HtmlTargetElement("script", Attributes = "asp-inline")]

aspnetcore/grpc/grpcweb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Alternatively, the gRPC-Web middleware can be configured so that all services su
5151
:::code language="csharp" source="~/grpc/grpcweb/sample/8.x/GrpcGreeter/Program.cs" id="snippet_WebEnableAllServices" highlight="9":::
5252

5353
> [!NOTE]
54-
> There is a known issue that causes gRPC-Web to fail when [hosted by HTTP.sys](xref:fundamentals/servers/httpsys) in .NET 3.x.
54+
> There is a known issue that causes gRPC-Web to fail when [hosted by HTTP.sys](xref:fundamentals/servers/httpsys) in .NET Core 3.x.
5555
>
5656
> A workaround to get gRPC-Web working on HTTP.sys is available in [Grpc-web experimental and UseHttpSys()? (grpc/grpc-dotnet #853)](https://github.com/grpc/grpc-dotnet/issues/853#issuecomment-610078202).
5757

aspnetcore/grpc/grpcweb/includes/grpcweb3-5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Alternatively, the gRPC-Web middleware can be configured so that all services su
3636
[!code-csharp[](~/grpc/grpcweb/sample/3-5.x/AllServicesSupportExample_Startup.cs?name=snippet_1&highlight=12)]
3737

3838
> [!NOTE]
39-
> There is a known issue that causes gRPC-Web to fail when [hosted by HTTP.sys](xref:fundamentals/servers/httpsys) in .NET 3.x.
39+
> There is a known issue that causes gRPC-Web to fail when [hosted by HTTP.sys](xref:fundamentals/servers/httpsys) in .NET Core 3.x.
4040
>
4141
> A workaround to get gRPC-Web working on HTTP.sys is available in [Grpc-web experimental and UseHttpSys()? (grpc/grpc-dotnet #853)](https://github.com/grpc/grpc-dotnet/issues/853#issuecomment-610078202).
4242

aspnetcore/grpc/grpcweb/includes/grpcweb6-7.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Alternatively, the gRPC-Web middleware can be configured so that all services su
3636
:::code language="csharp" source="~/grpc/grpcweb/sample/8.x/GrpcGreeter/Program.cs" id="snippet_WebEnableAllServices" highlight="9":::
3737

3838
> [!NOTE]
39-
> There is a known issue that causes gRPC-Web to fail when [hosted by HTTP.sys](xref:fundamentals/servers/httpsys) in .NET 3.x.
39+
> There is a known issue that causes gRPC-Web to fail when [hosted by HTTP.sys](xref:fundamentals/servers/httpsys) in .NET Core 3.x.
4040
>
4141
> A workaround to get gRPC-Web working on HTTP.sys is available in [Grpc-web experimental and UseHttpSys()? (grpc/grpc-dotnet #853)](https://github.com/grpc/grpc-dotnet/issues/853#issuecomment-610078202).
4242

aspnetcore/grpc/interprocess/includes/interprocess5-7.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Processes running on the same machine can be designed to communicate with each o
1212

1313
gRPC calls are sent from a client to a server. To communicate between apps on a machine with gRPC, at least one app must host an ASP.NET Core gRPC server.
1414

15-
ASP.NET Core and gRPC can be hosted in any app using .NET 3.1 or later by adding the `Microsoft.AspNetCore.App` framework to the project.
15+
ASP.NET Core and gRPC can be hosted in any app using .NET Core 3.1 or later by adding the `Microsoft.AspNetCore.App` framework to the project.
1616

1717
[!code-xml[](~/grpc/interprocess/Server.csproj?highlight=4-6)]
1818

aspnetcore/grpc/migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Due to the implementation of the underlying stack, not all features work in the
2121
gRPC C-core and gRPC for .NET have different platform support:
2222

2323
* **gRPC C-core**: A C++ gRPC implementation with its own TLS and HTTP/2 stacks. The `Grpc.Core` package is a .NET wrapper around gRPC C-core and contains a gRPC client and server. It supports .NET Framework, .NET, and .NET 5 or later.
24-
* **gRPC for .NET**: Designed for .NET 3.x and .NET 5 or later. It uses TLS and HTTP/2 stacks built into modern .NET releases. The `Grpc.AspNetCore` package contains a gRPC server that is hosted in ASP.NET Core and requires .NET 3.x or .NET 5 or later. The `Grpc.Net.Client` package contains a gRPC client. The client in `Grpc.Net.Client` has limited support for .NET Framework using <xref:System.Net.Http.WinHttpHandler>.
24+
* **gRPC for .NET**: Designed for .NET Core 3.x and .NET 5 or later. It uses TLS and HTTP/2 stacks built into modern .NET releases. The `Grpc.AspNetCore` package contains a gRPC server that is hosted in ASP.NET Core and requires .NET Core 3.x or .NET 5 or later. The `Grpc.Net.Client` package contains a gRPC client. The client in `Grpc.Net.Client` has limited support for .NET Framework using <xref:System.Net.Http.WinHttpHandler>.
2525

2626
For more information, see <xref:grpc/supported-platforms>.
2727

aspnetcore/grpc/performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ var channel = GrpcChannel.ForAddress("https://localhost", new GrpcChannelOptions
6262

6363
:::moniker-end
6464

65-
There are a couple of workarounds for .NET 3.1 apps:
65+
There are a couple of workarounds for .NET Core 3.1 apps:
6666

6767
* Create separate gRPC channels for areas of the app with high load. For example, the `Logger` gRPC service might have a high load. Use a separate channel to create the `LoggerClient` in the app.
6868
* Use a pool of gRPC channels, for example, create a list of gRPC channels. `Random` is used to pick a channel from the list each time a gRPC channel is needed. Using `Random` randomly distributes calls over multiple connections.

aspnetcore/grpc/supported-platforms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ gRPC on .NET supports both wire-formats. `application/grpc` is used by default.
2929

3030
## ASP.NET Core gRPC server requirements
3131

32-
Hosting gRPC services with ASP.NET Core requires .NET 3.x or later.
32+
Hosting gRPC services with ASP.NET Core requires .NET Core 3.x or later.
3333

3434
> [!div class="checklist"]
3535
>

aspnetcore/grpc/troubleshoot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The .NET gRPC client can call insecure gRPC services by specifing `http` in the
6767
There are some additional requirements to call insecure gRPC services depending on the .NET version an app is using:
6868

6969
* .NET 5 or later requires [Grpc.Net.Client](https://www.nuget.org/packages/Grpc.Net.Client) version 2.32.0 or later.
70-
* .NET 3.x requires additional configuration. The app must set the `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch to `true`. For more information see [Asp.Net Core 3.x: Call insecure gRPC services with the .NET client](xref:grpc/troubleshoot?view=aspnetcore-3.1#call-insecure-grpc-services-with-net-client-2):
70+
* .NET Core 3.x requires additional configuration. The app must set the `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch to `true`. For more information see [Asp.Net Core 3.x: Call insecure gRPC services with the .NET client](xref:grpc/troubleshoot?view=aspnetcore-3.1#call-insecure-grpc-services-with-net-client-2):
7171

7272
> [!IMPORTANT]
7373
> Insecure gRPC services must be hosted on a HTTP/2-only port. For more information, see [ASP.NET Core protocol negotiation](xref:grpc/aspnetcore#protocol-negotiation).

aspnetcore/grpc/troubleshoot/includes/troubleshoot3-7.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ The .NET gRPC client can call insecure gRPC services by specifing `http` in the
8282
There are some additional requirements to call insecure gRPC services depending on the .NET version an app is using:
8383

8484
* .NET 5 or later requires [Grpc.Net.Client](https://www.nuget.org/packages/Grpc.Net.Client) version 2.32.0 or later.
85-
* .NET 3.x requires additional configuration. The app must set the `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch to `true`:
85+
* .NET Core 3.x requires additional configuration. The app must set the `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch to `true`:
8686

8787
```csharp
8888
// This switch must be set before creating the GrpcChannel/HttpClient.
@@ -94,7 +94,7 @@ There are some additional requirements to call insecure gRPC services depending
9494
var client = new Greet.GreeterClient(channel);
9595
```
9696

97-
The `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch is only required for .NET 3.x. It does nothing in .NET 5 and isn't required.
97+
The `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch is only required for .NET Core 3.x. It does nothing in .NET 5 and isn't required.
9898

9999
> [!IMPORTANT]
100100
> Insecure gRPC services must be hosted on a HTTP/2-only port. For more information, see [ASP.NET Core protocol negotiation](xref:grpc/aspnetcore#protocol-negotiation).
@@ -422,7 +422,7 @@ The .NET gRPC client can call insecure gRPC services by specifing `http` in the
422422
There are some additional requirements to call insecure gRPC services depending on the .NET version an app is using:
423423

424424
* .NET 5 or later requires [Grpc.Net.Client](https://www.nuget.org/packages/Grpc.Net.Client) version 2.32.0 or later.
425-
* .NET 3.x requires additional configuration. The app must set the `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch to `true`:
425+
* .NET Core 3.x requires additional configuration. The app must set the `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch to `true`:
426426

427427
```csharp
428428
// This switch must be set before creating the GrpcChannel/HttpClient.
@@ -434,7 +434,7 @@ There are some additional requirements to call insecure gRPC services depending
434434
var client = new Greet.GreeterClient(channel);
435435
```
436436

437-
The `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch is only required for .NET 3.x. It does nothing in .NET 5 and isn't required.
437+
The `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch is only required for .NET Core 3.x. It does nothing in .NET 5 and isn't required.
438438

439439
> [!IMPORTANT]
440440
> Insecure gRPC services must be hosted on a HTTP/2-only port. For more information, see [ASP.NET Core protocol negotiation](xref:grpc/aspnetcore#protocol-negotiation).
@@ -671,7 +671,7 @@ The .NET gRPC client can call insecure gRPC services by specifing `http` in the
671671
There are some additional requirements to call insecure gRPC services depending on the .NET version an app is using:
672672

673673
* .NET 5 or later requires [Grpc.Net.Client](https://www.nuget.org/packages/Grpc.Net.Client) version 2.32.0 or later.
674-
* .NET 3.x requires additional configuration. The app must set the `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch to `true`:
674+
* .NET Core 3.x requires additional configuration. The app must set the `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch to `true`:
675675

676676
```csharp
677677
// This switch must be set before creating the GrpcChannel/HttpClient.
@@ -683,7 +683,7 @@ There are some additional requirements to call insecure gRPC services depending
683683
var client = new Greet.GreeterClient(channel);
684684
```
685685

686-
The `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch is only required for .NET 3.x. It does nothing in .NET 5 and isn't required.
686+
The `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch is only required for .NET Core 3.x. It does nothing in .NET 5 and isn't required.
687687

688688
> [!IMPORTANT]
689689
> Insecure gRPC services must be hosted on a HTTP/2-only port. For more information, see [ASP.NET Core protocol negotiation](xref:grpc/aspnetcore#protocol-negotiation).

0 commit comments

Comments
 (0)