<Project Sdk="Microsoft.NET.Sdk">

  <Import Project="Common.csproj.include" />

  <PropertyGroup>
    <Authors>The gRPC Authors</Authors>
    <Copyright>Copyright 2015 The gRPC Authors</Copyright>
    <Description>C# implementation of gRPC based on native gRPC C-core library.</Description>
    <PackageIconUrl>https://github.com/grpc/grpc.github.io/raw/master/img/grpc_square_reverse_4x.png</PackageIconUrl>
    <PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
    <PackageProjectUrl>https://github.com/grpc/grpc</PackageProjectUrl>
    <PackageTags>gRPC RPC HTTP/2</PackageTags>
    <VersionPrefix>$(GrpcCsharpVersion)</VersionPrefix>
  </PropertyGroup>

  <PropertyGroup>
    <TargetFrameworks>net45;netstandard1.5;netstandard2.0</TargetFrameworks>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
  </PropertyGroup>

  <PropertyGroup>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>

  <PropertyGroup>
    <LangVersion>7.2</LangVersion>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="..\Grpc.Core.Api\Version.cs" />
  </ItemGroup>

  <Import Project="SourceLink.csproj.include" />

  <ItemGroup>
    <EmbeddedResource Include="..\..\..\etc\roots.pem" />
    <Content Include="..\nativelibs\csharp_ext_macos_x64\libgrpc_csharp_ext.dylib">
      <PackagePath>runtimes/osx/native/libgrpc_csharp_ext.x64.dylib</PackagePath>
      <Pack>true</Pack>
    </Content>
    <Content Include="..\nativelibs\csharp_ext_macos_x86\libgrpc_csharp_ext.dylib">
      <PackagePath>runtimes/osx/native/libgrpc_csharp_ext.x86.dylib</PackagePath>
      <Pack>true</Pack>
    </Content>
    <Content Include="..\nativelibs\csharp_ext_linux_x64\libgrpc_csharp_ext.so">
      <PackagePath>runtimes/linux/native/libgrpc_csharp_ext.x64.so</PackagePath>
      <Pack>true</Pack>
    </Content>
    <Content Include="..\nativelibs\csharp_ext_linux_x86\libgrpc_csharp_ext.so">
      <PackagePath>runtimes/linux/native/libgrpc_csharp_ext.x86.so</PackagePath>
      <Pack>true</Pack>
    </Content>
    <Content Include="..\nativelibs\csharp_ext_windows_x64\grpc_csharp_ext.dll">
      <PackagePath>runtimes/win/native/grpc_csharp_ext.x64.dll</PackagePath>
      <Pack>true</Pack>
    </Content>
    <Content Include="..\nativelibs\csharp_ext_windows_x86\grpc_csharp_ext.dll">
      <PackagePath>runtimes/win/native/grpc_csharp_ext.x86.dll</PackagePath>
      <Pack>true</Pack>
    </Content>
    <Content Include="..\nativelibs\csharp_ext_linux_android_armeabi-v7a\libgrpc_csharp_ext.so">
      <PackagePath>native/android/armeabi-v7a/libgrpc_csharp_ext.so</PackagePath>
      <Pack>true</Pack>
    </Content>
    <Content Include="..\nativelibs\csharp_ext_linux_android_arm64-v8a\libgrpc_csharp_ext.so">
      <PackagePath>native/android/arm64-v8a/libgrpc_csharp_ext.so</PackagePath>
      <Pack>true</Pack>
    </Content>
    <Content Include="..\nativelibs\csharp_ext_linux_android_x86\libgrpc_csharp_ext.so">
      <PackagePath>native/android/x86/libgrpc_csharp_ext.so</PackagePath>
      <Pack>true</Pack>
    </Content>
    <Content Include="..\nativelibs\csharp_ext_macos_ios\libgrpc_csharp_ext.a">
      <PackagePath>native/ios/universal/libgrpc_csharp_ext.a</PackagePath>
      <Pack>true</Pack>
    </Content>
    <Content Include="..\nativelibs\csharp_ext_macos_ios\libgrpc.a">
      <PackagePath>native/ios/universal/libgrpc.a</PackagePath>
      <Pack>true</Pack>
    </Content>
    <Content Include="build\net45\Grpc.Core.targets">
      <PackagePath>build/net45/</PackagePath>
      <Pack>true</Pack>
    </Content>
    <Content Include="build\MonoAndroid10\Grpc.Core.targets">
      <PackagePath>build/MonoAndroid10/</PackagePath>
      <Pack>true</Pack>
    </Content>
    <Content Include="build\Xamarin.iOS10\Grpc.Core.targets">
      <PackagePath>build/Xamarin.iOS10/</PackagePath>
      <Pack>true</Pack>
    </Content>
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="../Grpc.Core.Api/Grpc.Core.Api.csproj" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="System.Memory" Version="4.5.3" />
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
    <Reference Include="System" />
    <Reference Include="Microsoft.CSharp" />
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' ">
    <PackageReference Include="System.Runtime.Loader" Version="4.0.0" />
    <PackageReference Include="System.Threading.Thread" Version="4.0.0" />
    <PackageReference Include="System.Threading.ThreadPool" Version="4.0.10" />
  </ItemGroup>

  <Import Project="NativeDeps.csproj.include" />

</Project>
