Skip to content

Commit bcb2ee9

Browse files
authored
Update YARP NuGet references in Getting Started (#34868)
1 parent 2b862b8 commit bcb2ee9

File tree

1 file changed

+25
-23
lines changed

1 file changed

+25
-23
lines changed

aspnetcore/fundamentals/servers/yarp/getting-started.md

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,43 +12,43 @@ ai-usage: ai-assisted
1212

1313
# Getting Started with YARP
1414

15-
YARP is designed as a library that provides the core proxy functionality which you can then customize by adding or replacing modules.
16-
YARP is currently provided as a NuGet package and code snippets.
17-
We plan on providing a project template and pre-built exe in the future.
15+
YARP is designed as a library that provides the core proxy functionality which you can then customize by adding or replacing modules. YARP is currently provided as a NuGet package and code snippets. We plan on providing a project template and prebuilt executable (`.exe`) in the future.
1816

19-
YARP is implemented on top of .NET Core infrastructure and is usable on Windows, Linux or MacOS.
20-
Development can be done with the SDK and your favorite editor, [Microsoft Visual Studio](https://visualstudio.microsoft.com/vs/) or [Visual Studio Code](https://code.visualstudio.com/).
17+
YARP is implemented on top of .NET Core infrastructure and is usable on Windows, Linux or MacOS. Development can be done with the SDK and your favorite editor, [Microsoft Visual Studio](https://visualstudio.microsoft.com/vs/) or [Visual Studio Code](https://code.visualstudio.com/).
18+
19+
YARP 2.3.0 supports ASP.NET Core 8.0 and newer.
2120

22-
YARP 2.1.0 supports ASP.NET Core 6.0 and newer, including ASP.NET Core 8.0.
2321
You can download the .NET SDK from https://dotnet.microsoft.com/download/dotnet/.
2422

2523
Visual Studio support for .NET 8 is included in Visual Studio 2022 17.8.
2624

27-
### Create a new project
25+
## Create a new project
2826

2927
A complete version of the project built using the steps below can be found at [Basic YARP Sample](https://github.com/microsoft/reverse-proxy/tree/release/latest/samples/BasicYarpSample).
3028

3129
Start by creating an "Empty" ASP.NET Core application using the command line:
3230

33-
```Console
31+
```dotnetcli
3432
dotnet new web -n MyProxy -f net8.0
3533
```
3634

37-
Or create a new ASP.NET Core web application in Visual Studio 2022, and choose "Empty" for the project template.
35+
Alternatively, create a new ASP.NET Core web application in Visual Studio 2022, choosing "Empty" for the project template.
36+
37+
## Add the package reference
3838

39-
### Add the project reference
39+
Add a package reference for [`Yarp.ReverseProxy`](https://www.nuget.org/packages/Yarp.ReverseProxy), version 2.3.0 or later.
4040

41-
```XML
42-
<ItemGroup>
43-
<PackageReference Include="Yarp.ReverseProxy" Version="2.1.0" />
44-
</ItemGroup>
41+
```dotnetcli
42+
dotnet add package Yarp.ReverseProxy
4543
```
4644

47-
### Add the YARP Middleware
45+
[!INCLUDE[](~/includes/package-reference.md)]
4846

49-
Update Program.cs to use the YARP middleware:
47+
## Add the YARP Middleware
5048

51-
```C#
49+
Update the `Program` file to use the YARP Middleware:
50+
51+
```csharp
5252
var builder = WebApplication.CreateBuilder(args);
5353
builder.Services.AddReverseProxy()
5454
.LoadFromConfig(builder.Configuration.GetSection("ReverseProxy"));
@@ -59,13 +59,13 @@ app.Run();
5959

6060
## Configuration
6161

62-
The configuration for YARP is defined in the appsettings.json file. See [Configuration Files](xref:fundamentals/servers/yarp/config-files) for details.
62+
The configuration for YARP is defined in the `appsettings.json` file. For more information, see <xref:fundamentals/servers/yarp/config-files>.
6363

64-
The configuration can also be provided programmatically. See [Configuration Providers](xref:fundamentals/servers/yarp/config-providers) for details.
64+
The configuration can also be provided programmatically. For more information, see <xref:fundamentals/servers/yarp/config-providers>.
6565

66-
You can find out more about the available configuration options by looking at [RouteConfig](xref:Yarp.ReverseProxy.Configuration.RouteConfig) and [ClusterConfig](xref:Yarp.ReverseProxy.Configuration.ClusterConfig).
66+
Learn more about the available configuration options by looking at <xref:Yarp.ReverseProxy.Configuration.RouteConfig> and <xref:Yarp.ReverseProxy.Configuration.ClusterConfig>.
6767

68-
```JSON
68+
```json
6969
{
7070
"Logging": {
7171
"LogLevel": {
@@ -97,6 +97,8 @@ You can find out more about the available configuration options by looking at [R
9797
}
9898
```
9999

100-
### Running the project
100+
## Run the project
101+
102+
When using the .NET CLU, use `dotnet run` called within the sample's directory or `dotnet run --project <path to .csproj file>`.
101103

102-
Use `dotnet run` called within the sample's directory or `dotnet run --project <path to .csproj file>`
104+
In Visual Studio, start the app with the **Run** button.

0 commit comments

Comments
 (0)