Skip to content

Commit

Permalink
update .NET core example to .csproj projects
Browse files Browse the repository at this point in the history
  • Loading branch information
jtattermusch committed Apr 20, 2017
1 parent abd8fb7 commit 923b131
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 118 deletions.
34 changes: 34 additions & 0 deletions examples/csharp/helloworld-from-cli/Greeter.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greeter", "Greeter\Greeter.csproj", "{13B6DFC8-F5F6-4CC2-99DF-57A7CF042033}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GreeterClient", "GreeterClient\GreeterClient.csproj", "{B754FB02-D501-4308-8B89-33AB7119C80D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GreeterServer", "GreeterServer\GreeterServer.csproj", "{DDBFF994-E076-43AD-B18D-049DFC1B670C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{13B6DFC8-F5F6-4CC2-99DF-57A7CF042033}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{13B6DFC8-F5F6-4CC2-99DF-57A7CF042033}.Debug|Any CPU.Build.0 = Debug|Any CPU
{13B6DFC8-F5F6-4CC2-99DF-57A7CF042033}.Release|Any CPU.ActiveCfg = Release|Any CPU
{13B6DFC8-F5F6-4CC2-99DF-57A7CF042033}.Release|Any CPU.Build.0 = Release|Any CPU
{B754FB02-D501-4308-8B89-33AB7119C80D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B754FB02-D501-4308-8B89-33AB7119C80D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B754FB02-D501-4308-8B89-33AB7119C80D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B754FB02-D501-4308-8B89-33AB7119C80D}.Release|Any CPU.Build.0 = Release|Any CPU
{DDBFF994-E076-43AD-B18D-049DFC1B670C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DDBFF994-E076-43AD-B18D-049DFC1B670C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DDBFF994-E076-43AD-B18D-049DFC1B670C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DDBFF994-E076-43AD-B18D-049DFC1B670C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
17 changes: 17 additions & 0 deletions examples/csharp/helloworld-from-cli/Greeter/Greeter.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyTitle>Greeter</AssemblyTitle>
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
<DebugType>portable</DebugType>
<AssemblyName>Greeter</AssemblyName>
<PackageId>Greeter</PackageId>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.2.0" />
<PackageReference Include="Grpc" Version="1.2.2" />
</ItemGroup>

</Project>
31 changes: 0 additions & 31 deletions examples/csharp/helloworld-from-cli/Greeter/project.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyTitle>GreeterClient</AssemblyTitle>
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
<DebugType>portable</DebugType>
<AssemblyName>GreeterClient</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>GreeterClient</PackageId>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Greeter\Greeter.csproj" />
</ItemGroup>

</Project>
35 changes: 0 additions & 35 deletions examples/csharp/helloworld-from-cli/GreeterClient/project.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyTitle>GreeterServer</AssemblyTitle>
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
<DebugType>portable</DebugType>
<AssemblyName>GreeterServer</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>GreeterServer</PackageId>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Greeter\Greeter.csproj" />
</ItemGroup>

</Project>
35 changes: 0 additions & 35 deletions examples/csharp/helloworld-from-cli/GreeterServer/project.json

This file was deleted.

17 changes: 5 additions & 12 deletions examples/csharp/helloworld-from-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,19 @@ Example projects in this directory depend on the [Grpc](https://www.nuget.org/pa
and [Google.Protobuf](https://www.nuget.org/packages/Google.Protobuf/) NuGet packages
which have been already added to the project for you.

The examples in this directory target .NET 4.5 framework, as .NET Core support is
currently experimental.

PREREQUISITES
-------------

- The DotNetCore SDK cli.

- The .NET 4.5 framework.

Both are available to download at https://www.microsoft.com/net/download
- The [.NET Core SDK](https://www.microsoft.com/net/core).

BUILD
-------

From the `examples/csharp/helloworld-from-cli` directory:

- `dotnet restore`
- `dotnet restore Greeter.sln`

- `dotnet build **/project.json` (this will automatically download NuGet dependencies)
- `dotnet build Greeter.sln`

Try it!
-------
Expand All @@ -40,14 +33,14 @@ Try it!

```
> cd GreeterServer
> dotnet run
> dotnet run -f netcoreapp1.0
```

- Run the client

```
> cd GreeterClient
> dotnet run
> dotnet run -f netcoreapp1.0
```

Tutorial
Expand Down
5 changes: 0 additions & 5 deletions examples/csharp/helloworld-from-cli/global.json

This file was deleted.

0 comments on commit 923b131

Please sign in to comment.