You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/fundamentals/target-aspnetcore.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,9 +24,9 @@ As preview releases of ASP.NET Core are made available, breaking changes are pos
24
24
25
25
## Use the ASP.NET Core shared framework
26
26
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).
28
28
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.
30
30
31
31
To reference ASP.NET Core, add the following `<FrameworkReference>` element to your project file:
32
32
@@ -114,7 +114,7 @@ This section doesn't discuss multi-targeting to support multiple versions of MVC
114
114
115
115
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).
116
116
117
-
If the project targets .NET 3.x, it requires:
117
+
If the project targets .NET Core 3.x, it requires:
118
118
119
119
* An `AddRazorSupportForMvc` MSBuild property set to `true`.
120
120
* A `<FrameworkReference>` element for the shared framework.
@@ -145,7 +145,7 @@ If the project targets .NET Standard instead, a [Microsoft.AspNetCore.Mvc](https
145
145
146
146
### Tag Helpers
147
147
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:
@@ -155,7 +155,7 @@ If targeting .NET Standard (to support versions earlier than ASP.NET Core 3.x),
155
155
156
156
### View components
157
157
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:
@@ -169,7 +169,7 @@ Multi-targeting is required to author a library that supports multiple variants
169
169
170
170
* ASP.NET Core 2.1 targeting .NET Framework 4.6.1
171
171
* 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
173
173
174
174
The following project file supports these variants via the `TargetFrameworks` property:
175
175
@@ -179,7 +179,7 @@ With the preceding project file:
179
179
180
180
* The `Markdig` package is added for all consumers.
181
181
* 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.
183
183
184
184
Alternatively, .NET Standard 2.0 could be targeted instead of targeting both .NET 2.1 and .NET Framework 4.6.1:
185
185
@@ -194,20 +194,20 @@ If your library needs to call platform-specific APIs, target specific .NET imple
194
194
195
195
## Use an API that hasn't changed
196
196
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:
198
198
199
199
* Follow the [standard library guidance](/dotnet/standard/library-guidance/).
200
200
* Add a package reference for each API's NuGet package if the corresponding assembly doesn't exist in the shared framework.
201
201
202
202
## Use an API that changed
203
203
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.
205
205
206
206
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.
207
207
208
208
If you can't rewrite the library, take the following steps:
209
209
210
-
* Add a target for .NET 3.1.
210
+
* Add a target for .NET Core 3.1.
211
211
* Add a `<FrameworkReference>` element for the shared framework.
212
212
* Use the [#if preprocessor directive](/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-if) with the appropriate target framework symbol to conditionally compile code.
213
213
@@ -224,16 +224,16 @@ Imagine that you want to use an ASP.NET Core API that was introduced in ASP.NET
224
224
225
225
If the library functionally requires the API and there's no way to implement it down-level:
226
226
227
-
* Target .NET 3.x only.
227
+
* Target .NET Core 3.x only.
228
228
* Add a `<FrameworkReference>` element for the shared framework.
229
229
230
230
If the library can implement the feature in a different way:
231
231
232
-
* Add .NET 3.x as a target framework.
232
+
* Add .NET Core 3.x as a target framework.
233
233
* Add a `<FrameworkReference>` element for the shared framework.
234
234
* Use the [#if preprocessor directive](/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-if) with the appropriate target framework symbol to conditionally compile code.
235
235
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.
> 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.
55
55
>
56
56
> 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).
> 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.
40
40
>
41
41
> 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).
> 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.
40
40
>
41
41
> 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).
Copy file name to clipboardExpand all lines: aspnetcore/grpc/interprocess/includes/interprocess5-7.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Processes running on the same machine can be designed to communicate with each o
12
12
13
13
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.
14
14
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.
Copy file name to clipboardExpand all lines: aspnetcore/grpc/migration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ Due to the implementation of the underlying stack, not all features work in the
21
21
gRPC C-core and gRPC for .NET have different platform support:
22
22
23
23
***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>.
25
25
26
26
For more information, see <xref:grpc/supported-platforms>.
Copy file name to clipboardExpand all lines: aspnetcore/grpc/performance.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ var channel = GrpcChannel.ForAddress("https://localhost", new GrpcChannelOptions
62
62
63
63
:::moniker-end
64
64
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:
66
66
67
67
* 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.
68
68
* 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.
Copy file name to clipboardExpand all lines: aspnetcore/grpc/troubleshoot.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ The .NET gRPC client can call insecure gRPC services by specifing `http` in the
67
67
There are some additional requirements to call insecure gRPC services depending on the .NET version an app is using:
68
68
69
69
* .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):
71
71
72
72
> [!IMPORTANT]
73
73
> 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).
Copy file name to clipboardExpand all lines: aspnetcore/grpc/troubleshoot/includes/troubleshoot3-7.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,7 @@ The .NET gRPC client can call insecure gRPC services by specifing `http` in the
82
82
There are some additional requirements to call insecure gRPC services depending on the .NET version an app is using:
83
83
84
84
* .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`:
86
86
87
87
```csharp
88
88
// 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
94
94
varclient=newGreet.GreeterClient(channel);
95
95
```
96
96
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.
98
98
99
99
> [!IMPORTANT]
100
100
> 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
* .NET5orlaterrequires [Grpc.Net.Client](https://www.nuget.org/packages/Grpc.Net.Client) version 2.32.0 or later.
425
-
* .NET3.xrequiresadditionalconfiguration. Theappmustsetthe `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch to `true`:
425
+
* .NETCore3.xrequiresadditionalconfiguration. Theappmustsetthe `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch to `true`:
426
426
427
427
```csharp
428
428
// 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
434
434
var client = new Greet.GreeterClient(channel);
435
435
```
436
436
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.
438
438
439
439
> [!IMPORTANT]
440
440
> 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
* .NET5orlaterrequires [Grpc.Net.Client](https://www.nuget.org/packages/Grpc.Net.Client) version 2.32.0 or later.
674
-
* .NET3.xrequiresadditionalconfiguration. Theappmustsetthe `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch to `true`:
674
+
* .NETCore3.xrequiresadditionalconfiguration. Theappmustsetthe `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch to `true`:
675
675
676
676
```csharp
677
677
// 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
683
683
var client = new Greet.GreeterClient(channel);
684
684
```
685
685
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.
687
687
688
688
> [!IMPORTANT]
689
689
> 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