aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/Google.Protobuf.csproj
blob: 9e76117375c3449ca1b60aeb9ad6ae4240009146 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<Project Sdk="Microsoft.NET.Sdk">
  <!-- If you update this, update the .csproj in the Docker file as well -->

  <PropertyGroup>
    <Description>C# runtime library for Protocol Buffers - Google's data interchange format.</Description>
    <Copyright>Copyright 2015, Google Inc.</Copyright>
    <AssemblyTitle>Google Protocol Buffers</AssemblyTitle>
    <VersionPrefix>3.26.2</VersionPrefix>
    <LangVersion>10.0</LangVersion>
    <Authors>Google Inc.</Authors>
    <TargetFrameworks>netstandard1.1;netstandard2.0;net45;net50</TargetFrameworks>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <AssemblyOriginatorKeyFile>../../keys/Google.Protobuf.snk</AssemblyOriginatorKeyFile>
    <SignAssembly>true</SignAssembly>
    <PackageTags>Protocol;Buffers;Binary;Serialization;Format;Google;proto;proto3</PackageTags>
    <PackageReleaseNotes>C# proto3 support</PackageReleaseNotes>
    <PackageProjectUrl>https://github.com/protocolbuffers/protobuf</PackageProjectUrl>
    <PackageLicenseExpression>BSD-3-Clause</PackageLicenseExpression>
    <RepositoryType>git</RepositoryType>
    <RepositoryUrl>https://github.com/protocolbuffers/protobuf.git</RepositoryUrl>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <EmbedUntrackedSources>true</EmbedUntrackedSources>
    <!-- Include PDB in the built .nupkg -->
    <AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
    <IsTrimmable>true</IsTrimmable>
    <!-- Disable warnings about AOT and trimming features on older targets, e.g. netstandard2.0.
         For now, continue to apply these features to these targets because some packages don't have a target that supports them -->
    <NoWarn>$(NoWarn);NETSDK1195;NETSDK1210</NoWarn>	  
  </PropertyGroup>

  <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
    <DefineConstants>$(DefineConstants);GOOGLE_PROTOBUF_SUPPORT_FAST_STRING</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(TargetFramework)' == 'net50' ">
    <DefineConstants>$(DefineConstants);GOOGLE_PROTOBUF_SUPPORT_FAST_STRING;GOOGLE_PROTOBUF_SIMD</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="1.0.0"/>
    <!-- Needed for the net45 build to work on Unix. See https://github.com/dotnet/designs/pull/33 -->
    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0"/>
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netstandard1.1' ">
    <PackageReference Include="System.Memory" Version="4.5.3"/>
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
    <PackageReference Include="System.Memory" Version="4.5.3"/>
    <!-- Needed for netcoreapp3.1 to work correctly. .NET is not able to load the assembly without this -->
    <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.2"/>
  </ItemGroup>

</Project>