aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Tools/Grpc.Tools.csproj
diff options
context:
space:
mode:
Diffstat (limited to 'src/csharp/Grpc.Tools/Grpc.Tools.csproj')
-rw-r--r--src/csharp/Grpc.Tools/Grpc.Tools.csproj101
1 files changed, 101 insertions, 0 deletions
diff --git a/src/csharp/Grpc.Tools/Grpc.Tools.csproj b/src/csharp/Grpc.Tools/Grpc.Tools.csproj
new file mode 100644
index 0000000000..61fa75a4ec
--- /dev/null
+++ b/src/csharp/Grpc.Tools/Grpc.Tools.csproj
@@ -0,0 +1,101 @@
+<Project Sdk="Microsoft.NET.Sdk" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <Import Project="..\Grpc.Core\Version.csproj.include" />
+
+ <PropertyGroup>
+ <AssemblyName>Protobuf.MSBuild</AssemblyName>
+ <Version>$(GrpcCsharpVersion)</Version>
+ <!-- If changing targets, change also paths in Google.Protobuf.Tools.targets. -->
+ <TargetFrameworks>net45;netstandard1.3</TargetFrameworks>
+ </PropertyGroup>
+
+ <!-- This is copied verbatim from Grpc.Core/Common.csproj.include. Other settings
+ in that file conflict with the intent of this build, as it cannot be signed,
+ and may not compile Grpc.Core/Version.cs, as that file references constants
+ in Grpc.Core.dll.
+ TODO(kkm): Refactor imports. -->
+ <PropertyGroup Condition=" '$(OS)' != 'Windows_NT' and '$(MSBuildRuntimeType)' == 'Core' ">
+ <!-- Use Mono reference assemblies in SDK build: https://github.com/dotnet/sdk/issues/335 -->
+ <FrameworkPathOverride Condition="Exists('/usr/lib/mono/4.5-api')">/usr/lib/mono/4.5-api</FrameworkPathOverride>
+ <FrameworkPathOverride Condition="Exists('/usr/local/lib/mono/4.5-api')">/usr/local/lib/mono/4.5-api</FrameworkPathOverride>
+ <FrameworkPathOverride Condition="Exists('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5-api')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5-api</FrameworkPathOverride>
+ </PropertyGroup>
+
+ <PropertyGroup Label="Asset root folders. TODO(kkm): Change with package separation.">
+ <!-- TODO(kkm): Rework whole section when splitting packages. -->
+ <!-- GRPC: ../../third_party/protobuf/src/google/protobuf/ -->
+ <!-- GPB: ../src/google/protobuf/ -->
+ <Assets_ProtoInclude>../../../third_party/protobuf/src/google/protobuf/</Assets_ProtoInclude>
+
+ <!-- GPB: ../protoc/ -->
+ <!-- GRPC: ../protoc_plugins/protoc_ -->
+ <Assets_ProtoCompiler>../protoc_plugins/protoc_</Assets_ProtoCompiler>
+
+ <!-- GRPC: ../protoc_plugins/ -->
+ <Assets_GrpcPlugins>../protoc_plugins/</Assets_GrpcPlugins>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(TargetFramework)' != 'net45' ">
+ <DefineConstants>$(DefineConstants);NETCORE</DefineConstants>
+ </PropertyGroup>
+
+ <PropertyGroup Label="NuGet package definition" Condition=" '$(Configuration)' == 'Release' ">
+ <!-- TODO(kkm): Change to "build\" after splitting. -->
+ <BuildOutputTargetFolder>build\_protobuf\</BuildOutputTargetFolder>
+ <DevelopmentDependency>true</DevelopmentDependency>
+ <NoPackageAnalysis>true</NoPackageAnalysis>
+ <PackageId>Grpc.Tools</PackageId>
+ <Description>gRPC and Protocol Buffer compiler for managed C# and native C++ projects.
+
+Add this package to a project that contains .proto files to be compiled to code.
+It contains the compilers, include files and project system integration for gRPC
+and Protocol buffer service description files necessary to build them on Windows,
+Linux and MacOS. Managed runtime is supplied separately in the Grpc.Core package.</Description>
+ <Copyright>Copyright 2018 gRPC authors</Copyright>
+ <Authors>gRPC authors</Authors>
+ <PackageLicenseUrl>https://github.com/grpc/grpc/blob/master/LICENSE</PackageLicenseUrl>
+ <PackageProjectUrl>https://github.com/grpc/grpc</PackageProjectUrl>
+ <PackageTags>gRPC RPC protocol HTTP/2</PackageTags>
+ </PropertyGroup>
+
+ <ItemGroup Label="NuGet package assets">
+ <None Pack="true" PackagePath="build\" Include="build\**\*.xml; build\**\*.props; build\**\*.targets;" />
+
+ <!-- Protobuf assets (for Google.Protobuf.Tools) -->
+ <_ProtoAssetName Include="any;api;descriptor;duration;empty;field_mask;
+ source_context;struct;timestamp;type;wrappers" />
+ <_Asset PackagePath="build/native/include/google/protobuf/" Include="@(_ProtoAssetName->'$(Assets_ProtoInclude)%(Identity).proto')" />
+
+ <!-- TODO(kkm): GPB builds assets into "macosx", GRPC into "macos". -->
+ <!-- TODO(kkm): Do not place non-tools under tools/, use build/native/bin/. -->
+ <!-- TODO(kkm): Do not package windows x64 builds (#13098). -->
+ <_Asset PackagePath="tools/windows_x86/protoc.exe" Include="$(Assets_ProtoCompiler)windows_x86/protoc.exe" />
+ <_Asset PackagePath="tools/windows_x64/protoc.exe" Include="$(Assets_ProtoCompiler)windows_x64/protoc.exe" />
+ <_Asset PackagePath="tools/linux_x86/protoc" Include="$(Assets_ProtoCompiler)linux_x86/protoc" />
+ <_Asset PackagePath="tools/linux_x64/protoc" Include="$(Assets_ProtoCompiler)linux_x64/protoc" />
+ <_Asset PackagePath="tools/macosx_x86/protoc" Include="$(Assets_ProtoCompiler)macos_x86/protoc" /> <!-- GPB: macosx-->
+ <_Asset PackagePath="tools/macosx_x64/protoc" Include="$(Assets_ProtoCompiler)macos_x64/protoc" /> <!-- GPB: macosx-->
+
+ <!-- gRPC assets (for Grpc.Tools) -->
+ <_Asset PackagePath="tools/windows_x86/grpc_csharp_plugin.exe" Include="$(Assets_GrpcPlugins)protoc_windows_x86/grpc_csharp_plugin.exe" />
+ <_Asset PackagePath="tools/windows_x64/grpc_csharp_plugin.exe" Include="$(Assets_GrpcPlugins)protoc_windows_x64/grpc_csharp_plugin.exe" />
+ <_Asset PackagePath="tools/linux_x86/grpc_csharp_plugin" Include="$(Assets_GrpcPlugins)protoc_linux_x86/grpc_csharp_plugin" />
+ <_Asset PackagePath="tools/linux_x64/grpc_csharp_plugin" Include="$(Assets_GrpcPlugins)protoc_linux_x64/grpc_csharp_plugin" />
+ <_Asset PackagePath="tools/macosx_x86/grpc_csharp_plugin" Include="$(Assets_GrpcPlugins)protoc_macos_x86/grpc_csharp_plugin" />
+ <_Asset PackagePath="tools/macosx_x64/grpc_csharp_plugin" Include="$(Assets_GrpcPlugins)protoc_macos_x64/grpc_csharp_plugin" />
+
+ <None Include="@(_Asset)" Pack="true" Visible="false" />
+ </ItemGroup>
+
+ <ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
+ <Reference Include="Microsoft.Build.Framework; Microsoft.Build.Utilities.v4.0" Pack="false" />
+ </ItemGroup>
+
+ <ItemGroup Condition=" '$(TargetFramework)' != 'net45' ">
+ <PackageReference Include="Microsoft.Build.Framework; Microsoft.Build.Utilities.Core" Version="15.6.*" />
+ <!-- Set PrivateAssets="All" on all items, even those implicitly added,
+ so that they do not become dependencies of this package. -->
+ <PackageReference Update="@(PackageReference)" PrivateAssets="All" />
+ </ItemGroup>
+
+</Project>