Skip to content

Commit

Permalink
3.1 update for gRPC-start tutorial and its two sample apps (#18103)
Browse files Browse the repository at this point in the history
* 3.1 udpate for Updated gRPC-start tutorial and its two sample apps

* Update GrpcGreeter.csproj

Update per review feedback.

* Update GrpcGreeter.csproj

Reversing change that caused the merge issue.

* Update grpc-start.md

Resolving merge conflict with mass no-loc for razor fix that occurred today.

* Update GrpcGreeter.csproj

Fixing per review.

* Update grpc-start.md

Addressing merge conflict - ms.date line
  • Loading branch information
wadepickett authored May 5, 2020
1 parent 86153f2 commit 1dc5a14
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 15 deletions.
8 changes: 4 additions & 4 deletions aspnetcore/tutorials/grpc/grpc-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ In this tutorial, you:

# [Visual Studio](#tab/visual-studio)

[!INCLUDE[](~/includes/net-core-prereqs-vs-3.0.md)]
[!INCLUDE[](~/includes/net-core-prereqs-vs-3.1.md)]

# [Visual Studio Code](#tab/visual-studio-code)

[!INCLUDE[](~/includes/net-core-prereqs-vsc-3.0.md)]
[!INCLUDE[](~/includes/net-core-prereqs-vsc-3.1.md)]

# [Visual Studio for Mac](#tab/visual-studio-mac)

[!INCLUDE[](~/includes/net-core-prereqs-mac-3.0.md)]
[!INCLUDE[](~/includes/net-core-prereqs-mac-3.1.md)]

---

Expand Down Expand Up @@ -125,7 +125,7 @@ info: Microsoft.Hosting.Lifetime[0]

* Open a second instance of Visual Studio and select **Create a new project**.
* In the **Create a new project** dialog, select **Console App (.NET Core)** and select **Next**.
* In the **Name** text box, enter **GrpcGreeterClient** and select **Create**.
* In the **Project name** text box, enter **GrpcGreeterClient** and select **Create**.

# [Visual Studio Code](#tab/visual-studio-code)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Protobuf Include="Protos\greet.proto" GrpcServices="Server" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Grpc.AspNetCore" Version="2.23.2" />
<PackageReference Include="Grpc.AspNetCore" Version="2.28.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public static void Main(string[] args)
CreateHostBuilder(args).Build().Run();
}

// Additional configuration is required to successfully run gRPC on macOS.
// For instructions on how to configure Kestrel and gRPC clients on macOS, visit https://go.microsoft.com/fwlink/?linkid=2099682
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@
using System.Linq;
using System.Threading.Tasks;
using Grpc.Core;
using Microsoft.Extensions.Logging;

namespace GrpcGreeter
{
#region snippet
public class GreeterService : Greeter.GreeterBase
{
public override Task<HelloReply> SayHello(
HelloRequest request, ServerCallContext context)
private readonly ILogger<GreeterService> _logger;
public GreeterService(ILogger<GreeterService> logger)
{
_logger = logger;
}

public override Task<HelloReply> SayHello(HelloRequest request, ServerCallContext context)
{
return Task.FromResult(new HelloReply
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Warning",
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.9.2" />
<PackageReference Include="Grpc.Net.Client" Version="2.23.2" />
<PackageReference Include="Grpc.Tools" Version="2.23.0" PrivateAssets="All" />
<PackageReference Include="Google.Protobuf" Version="3.11.4" />
<PackageReference Include="Grpc.Net.Client" Version="2.28.0" />
<PackageReference Include="Grpc.Tools" Version="2.28.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 1dc5a14

Please # to comment.