Make test and samples directories handle DeterministicSourcePaths

(This is important for CI and release builds.)

Signed-off-by: Jon Skeet <jonskeet@google.com>
This commit is contained in:
Jon Skeet 2020-06-25 14:42:28 +01:00 committed by Jon Skeet
parent e39d213926
commit aea34a4f5c
3 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,6 @@
<Project>
<!-- Use SourceLink for all production projects, as a simple way of handling DeterministicSourcePaths -->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,6 @@
<Project>
<PropertyGroup>
<!-- Disable deterministic source paths for test projects -->
<DeterministicSourcePaths>False</DeterministicSourcePaths>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,16 @@
<Project>
<!-- See https://github.com/dotnet/sourcelink/issues/572 -->
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
</ItemGroup>
<!-- Use SourceLink for all production projects, and include the licence file -->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
<None Include="$(RepoRoot)/LICENSE" Pack="true" PackagePath="" />
</ItemGroup>
</Project>