Skip to content

Commit bace5f3

Browse files
committed
NuGet best practices
Updates the Numerics project settings to build better NuGets
1 parent e2de9c7 commit bace5f3

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

‎Numerics/Numerics.csproj‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
<PropertyGroup>
44
<TargetFrameworks>net9.0;net8.0;net481</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
76
<GenerateDocumentationFile>True</GenerateDocumentationFile>
7+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
8+
<DebugType>embedded</DebugType>
89

910
<Description>Numerics is a free and open-source library for .NET developed by USACE-RMC, providing a comprehensive set of methods and algorithms for numerical computations and statistical analysis.</Description>
1011
<PackageProjectUrl>https://github.com/USArmy-Corps-of-Engineers-RMC/Numerics</PackageProjectUrl>
@@ -28,11 +29,26 @@
2829
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
2930
<WarningLevel>1</WarningLevel>
3031
</PropertyGroup>
31-
32+
33+
<!-- Otherwise targets C# 7.3 which doesn't have global usings and some other syntactic sugar utilized here. -->
3234
<PropertyGroup Condition="'$(TargetFramework)' == 'net481'">
3335
<LangVersion>latest</LangVersion>
3436
</PropertyGroup>
3537

38+
39+
<ItemGroup>
40+
<!--https://github.com/dotnet/reproducible-builds-->
41+
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.2.25">
42+
<PrivateAssets>all</PrivateAssets>
43+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
44+
</PackageReference>
45+
<!--https://github.com/dotnet/sourcelink/tree/main-->
46+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
47+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
48+
<PrivateAssets>all</PrivateAssets>
49+
</PackageReference>
50+
</ItemGroup>
51+
3652
<!-- Conditional dependencies for .NET Framework -->
3753
<ItemGroup Condition="'$(TargetFramework)' == 'net481'">
3854
<Reference Include="System" />
@@ -64,7 +80,7 @@
6480
<Pack>True</Pack>
6581
<PackagePath>\</PackagePath>
6682
</None>
67-
<None Include="bin\Release\README.md">
83+
<None Include="..\README.md">
6884
<Pack>True</Pack>
6985
<PackagePath>\</PackagePath>
7086
</None>

0 commit comments

Comments
 (0)