1<?xml version="1.0"?> 2<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 <PropertyGroup> 4 <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> 5 <gRPC_PluginFileName Condition=" '$(gRPC_PluginFileName)' == '' and '$(Language)' == 'C#' ">grpc_csharp_plugin</gRPC_PluginFileName> 6 </PropertyGroup> 7 8 <ItemGroup Condition=" '$(Protobuf_ProjectSupported)' == 'true' and '$(Language)' == 'C#' "> 9 <!-- Extend property pages with gRPC properties. --> 10 <PropertyPageSchema Include="$(MSBuildThisFileDirectory)Grpc.CSharp.xml"> 11 <Context>File;BrowseObject</Context> 12 </PropertyPageSchema> 13 </ItemGroup> 14 15 <ItemDefinitionGroup Condition=" '$(Protobuf_ProjectSupported)' == 'true' and '$(Language)' == 'C#' "> 16 <Protobuf> 17 <GrpcServices Condition=" '%(Protobuf.GrpcServices)' == '' ">Both</GrpcServices> 18 </Protobuf> 19 </ItemDefinitionGroup> 20 21 <!-- This target is invoked in a C# project, or can be called in a customized project. --> 22 <Target Name="gRPC_ResolvePluginFullPath" AfterTargets="Protobuf_ResolvePlatform"> 23 <PropertyGroup> 24 <!-- TODO(kkm): Do not use Protobuf_PackagedToolsPath, roll gRPC's own. --> 25 <gRPC_PluginFullPath Condition=" '$(gRPC_PluginFullPath)' == '' and '$(Protobuf_ToolsOs)' == 'windows' " 26 >$(Protobuf_PackagedToolsPath)\$(Protobuf_ToolsOs)_$(Protobuf_ToolsCpu)\$(gRPC_PluginFileName).exe</gRPC_PluginFullPath> 27 <gRPC_PluginFullPath Condition=" '$(gRPC_PluginFullPath)' == '' " 28 >$(Protobuf_PackagedToolsPath)/$(Protobuf_ToolsOs)_$(Protobuf_ToolsCpu)/$(gRPC_PluginFileName)</gRPC_PluginFullPath> 29 </PropertyGroup> 30 </Target> 31 32 <Target Name="_gRPC_PrepareCompileOptions" AfterTargets="Protobuf_PrepareCompileOptions"> 33 <ItemGroup Condition=" '$(Language)' == 'C#' "> 34 <Protobuf_Compile Condition=" %(Protobuf_Compile.GrpcServices) != 'None' "> 35 <GrpcPluginExe Condition=" '%(Protobuf_Compile.GrpcPluginExe)' == '' ">$(gRPC_PluginFullPath)</GrpcPluginExe> 36 <GrpcOutputDir Condition=" '%(Protobuf_Compile.GrpcOutputDir)' == '' " >%(Protobuf_Compile.OutputDir)</GrpcOutputDir> 37 <_GrpcOutputOptions Condition=" '%(Protobuf_Compile.Access)' == 'Internal' ">%(Protobuf_Compile._GrpcOutputOptions);internal_access</_GrpcOutputOptions> 38 </Protobuf_Compile> 39 <Protobuf_Compile Condition=" '%(Protobuf_Compile.GrpcServices)' == 'Client' "> 40 <_GrpcOutputOptions>%(Protobuf_Compile._GrpcOutputOptions);no_server</_GrpcOutputOptions> 41 </Protobuf_Compile> 42 <Protobuf_Compile Condition=" '%(Protobuf_Compile.GrpcServices)' == 'Server' "> 43 <_GrpcOutputOptions>%(Protobuf_Compile._GrpcOutputOptions);no_client</_GrpcOutputOptions> 44 </Protobuf_Compile> 45 </ItemGroup> 46 </Target> 47</Project> 48