Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions distribution/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup Label="Metadata configuration">
<OrganizationName><!-- insert organization name here --></OrganizationName>
<RepositoryName><!-- insert repository name here --></RepositoryName>
</PropertyGroup>

<!-- Solution wide properties -->
<PropertyGroup Label="Assembly Naming">
<Company>CompanyName</Company>
<Authors>CompanyName</Authors>
<Company>$(OrganizationName)</Company>
<Authors>$(OrganizationName)</Authors>
<NeutralLanguage>en</NeutralLanguage>
<DefaultLanguage>en-US</DefaultLanguage>
</PropertyGroup>
Expand All @@ -22,9 +27,9 @@

<PropertyGroup Label="Analyzer settings">
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<!-- Treat warnings as errors are always on when building in release -->
Expand Down
Binary file added distribution/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 56 additions & 9 deletions distribution/src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,67 @@
-->
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />

<PropertyGroup Label="Nuget package metadata">
<OrganizationName><!-- Insert organization name here --></OrganizationName>
<RepositoryName><!-- Insert repository name here --></RepositoryName>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<!--
Place this in your csproj file for each nuget package that needs to be generated.

<PropertyGroup>
<PackageId>my-id</PackageId>
<PackageTags>tag1;tag2</PackageTags>
<Description>Package description.</Description>
</PropertyGroup>

-->

<!-- Global nuget package configurations that should not be needed to change -->
<PropertyGroup Label="Global Nuget Package metadata">
<RepositoryUrl>https://github.com/$(OrganizationName)/$(RepositoryName)</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageProjectUrl>https://github.com/$(OrganizationName)/$(RepositoryName)</PackageProjectUrl>
<PackageTags></PackageTags>
<Product></Product>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/$(OrganizationName)/$(RepositoryName)</PackageProjectUrl>
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>

<ItemGroup>
<!-- Ensures package icon is valid -->
<None Include="..\..\images\icon.png" Pack="true" PackagePath="\" Visible="false" />
</ItemGroup>

<PropertyGroup Label="Build instructions">
<OutputType>Library</OutputType>
<TargetFramework>net5.0</TargetFramework>

<!-- Creates a regular package and a symbols package -->
<IncludeSymbols>true</IncludeSymbols>
<!-- Creates symbol package in the new .snupkg format -->
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<!--
Instruct the build system to embed project source files that are not tracked by the source control
or imported from a source package to the generated PDB.
-->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- Recommended: Embed symbols containing Source Link in the main file (exe/dll) -->
<DebugType>embedded</DebugType>
<!-- <SymbolPackageFormat>snupkg</SymbolPackageFormat> # NU5017 - https://github.com/NuGet/Home/issues/10372 -->

<!-- Will generate nuget packages for each project -->
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<!-- Web projects aren't packable by default. To override the default behavior, add the following -->
<!--<IsPackable>true</IsPackable>-->
</PropertyGroup>

<!--
By default builds are non-deterministic, meaning there is no guarantee that building the same code twice(on the same or different machines)
will produce exactly the same binary output. Deterministic builds are important as they enable verification that the resulting
binary was built from the specified source and provides traceability.

To enable deterministic builds a property should be set to through: ContinuousIntegrationBuild.

Important: This property should not be enabled during local development as the debugger won't be able to find the local source files.

see : https://bartwullems.blogspot.com/2021/01/improve-debugging-experience-with.html
-->
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions distribution/test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
-->
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />

<PropertyGroup Label="Compile settings">
<Nullable>annotations</Nullable>
</PropertyGroup>

<ItemGroup Label="Test Analyzers">
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.14" PrivateAssets="All" />
</ItemGroup>
Expand Down