Files
dotnet/Directory.Build.props
T
Sergio Pedri 223fb36f1d Add reproducible builds pkg; remove embedded PDB
Add DotNet.ReproducibleBuilds (with comment) alongside Nerdbank.GitVersioning to enable reproducible build tooling. Remove the explicit PublishRepositoryUrl setting from Directory.Build.props. Drop the ContinuousIntegrationBuild property from build/Community.Toolkit.Common.props. Remove forced DebugType=embedded and associated comments from the source generator and codefixer props, reverting to default PDB handling for those projects.
2026-03-16 10:26:45 -07:00

49 lines
1.8 KiB
XML

<Project>
<PropertyGroup>
<RepositoryDirectory>$(MSBuildThisFileDirectory)</RepositoryDirectory>
<BuildToolsDirectory>$(RepositoryDirectory)build\</BuildToolsDirectory>
</PropertyGroup>
<Import Project="$(BuildToolsDirectory)Community.Toolkit.Common.props" />
<Choose>
<When Condition="$(IsCoreProject)">
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageOutputPath>$(RepositoryDirectory)bin\nupkg</PackageOutputPath>
<TreatWarningsAsErrors Condition="'$(Configuration)' == 'Release'">true</TreatWarningsAsErrors>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<IsPackable>false</IsPackable>
<IsPublishable>false</IsPublishable>
<NoWarn>$(NoWarn);CS8002;SA0001</NoWarn>
</PropertyGroup>
</Otherwise>
</Choose>
<!-- Build-only packages for versioning and reproducible builds -->
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.9.50" PrivateAssets="All" IsImplicitlyReferenced="true" />
<PackageReference Include="DotNet.ReproducibleBuilds" Version="2.0.2" PrivateAssets="all" IsImplicitlyReferenced="true" />
</ItemGroup>
<Choose>
<When Condition="'$(SourceLinkEnabled)' != 'false'">
<PropertyGroup>
<!-- Embed source files that are not tracked by the source control manager to the PDB -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- Include PDB in the built .nupkg -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>
</When>
</Choose>
</Project>