Merge pull request #18333 from jtattermusch/csharp_sourcelink_fix

C#: Activate sourcelink when building nuget packages
pull/18352/head
Jan Tattermusch 6 years ago committed by GitHub
commit 2db08e086c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      src/csharp/Grpc.Core/SourceLink.csproj.include
  2. 14
      src/csharp/build_packages_dotnetcli.bat

@ -1,17 +1,6 @@
<!-- Ensure that debugging of the resulting NuGet packages work (we're using SourceLink). -->
<Project>
<ItemGroup Label="dotnet pack instructions">
<Content Include="$(OutputPath)netstandard1.5\$(PackageId).pdb">
<Pack>true</Pack>
<PackagePath>lib/netstandard1.5</PackagePath>
</Content>
<Content Include="$(OutputPath)net45\$(PackageId).pdb">
<Pack>true</Pack>
<PackagePath>lib/net45</PackagePath>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.7.6" PrivateAssets="all" />
</ItemGroup>

@ -32,13 +32,13 @@ expand_dev_version.sh
@rem To be able to build, we also need to put grpc_csharp_ext to its normal location
xcopy /Y /I nativelibs\csharp_ext_windows_x64\grpc_csharp_ext.dll ..\..\cmake\build\x64\Release\
%DOTNET% pack --configuration Release Grpc.Core.Api --output ..\..\..\artifacts || goto :error
%DOTNET% pack --configuration Release Grpc.Core --output ..\..\..\artifacts || goto :error
%DOTNET% pack --configuration Release Grpc.Core.Testing --output ..\..\..\artifacts || goto :error
%DOTNET% pack --configuration Release Grpc.Auth --output ..\..\..\artifacts || goto :error
%DOTNET% pack --configuration Release Grpc.HealthCheck --output ..\..\..\artifacts || goto :error
%DOTNET% pack --configuration Release Grpc.Reflection --output ..\..\..\artifacts || goto :error
%DOTNET% pack --configuration Release Grpc.Tools --output ..\..\..\artifacts || goto :error
%DOTNET% pack --configuration Release Grpc.Core.Api /p:SourceLinkCreate=true --output ..\..\..\artifacts || goto :error
%DOTNET% pack --configuration Release Grpc.Core /p:SourceLinkCreate=true --output ..\..\..\artifacts || goto :error
%DOTNET% pack --configuration Release Grpc.Core.Testing /p:SourceLinkCreate=true --output ..\..\..\artifacts || goto :error
%DOTNET% pack --configuration Release Grpc.Auth /p:SourceLinkCreate=true --output ..\..\..\artifacts || goto :error
%DOTNET% pack --configuration Release Grpc.HealthCheck /p:SourceLinkCreate=true --output ..\..\..\artifacts || goto :error
%DOTNET% pack --configuration Release Grpc.Reflection /p:SourceLinkCreate=true --output ..\..\..\artifacts || goto :error
%DOTNET% pack --configuration Release Grpc.Tools /p:SourceLinkCreate=true --output ..\..\..\artifacts || goto :error
@rem build auxiliary packages
%DOTNET% pack --configuration Release Grpc --output ..\..\..\artifacts || goto :error
%DOTNET% pack --configuration Release Grpc.Core.NativeDebug --output ..\..\..\artifacts || goto :error

Loading…
Cancel
Save