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
6 changes: 6 additions & 0 deletions BenchmarkDotNet.slnx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<Solution>
<Folder Name="/build/">
<File Path="build/common.props" />
<File Path="build/common.targets" />
</Folder>
<Folder Name="/samples/">
<File Path="samples/Directory.Build.props" />
<Project Path="samples/BenchmarkDotNet.Samples.FSharp/BenchmarkDotNet.Samples.FSharp.fsproj" />
<Project Path="samples/BenchmarkDotNet.Samples/BenchmarkDotNet.Samples.csproj" DefaultStartup="true" />
</Folder>
Expand All @@ -19,6 +24,7 @@
<Project Path="templates/BenchmarkDotNet.Templates.csproj" />
</Folder>
<Folder Name="/tests/">
<File Path="tests/Directory.Build.props" />
<Project Path="tests/BenchmarkDotNet.Analyzers.Tests/BenchmarkDotNet.Analyzers.Tests.csproj" />
<Project Path="tests/BenchmarkDotNet.Exporters.Plotting.Tests/BenchmarkDotNet.Exporters.Plotting.Tests.csproj" />
<Project Path="tests/BenchmarkDotNet.IntegrationTests.ConfigPerAssembly/BenchmarkDotNet.IntegrationTests.ConfigPerAssembly.csproj" />
Expand Down
18 changes: 4 additions & 14 deletions build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,16 @@
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)package-icon.png" Pack="True" PackagePath=""/>
</ItemGroup>

<PropertyGroup>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)strongNameKey.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<PropertyGroup Condition="'$(GenerateDocumentationFile)' == '' AND '$(Configuration)' == 'Release' ">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup Condition=" '$(IsVisualBasic)' != 'true' AND '$(IsFsharp)' != 'true' ">
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj' ">
<LangVersion>14.0</LangVersion>
</PropertyGroup>

Expand All @@ -68,14 +64,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<GlobalPackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
<GlobalPackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" />
</ItemGroup>

<UsingTask TaskName="ReplaceFileText"
Expand Down
7 changes: 7 additions & 0 deletions build/common.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>

<ItemGroup Condition="'$(IsPackable)' == 'true'">
<None Include="$(MSBuildThisFileDirectory)package-icon.png" Pack="True" PackagePath=""/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- MSBuild was complaing about InformationalVersion from common.props file, so I excluded them in conditional way -->
<IsFsharp>true</IsFsharp>
</PropertyGroup>
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
Expand All @@ -28,4 +24,6 @@
<PackageReference Update="System.ValueTuple" Version="4.6.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
</ItemGroup>

<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,5 @@
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
</ItemGroup>

<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<AssemblyName>BenchmarkDotNet.Samples</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>BenchmarkDotNet.Samples</PackageId>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<NoWarn>$(NoWarn);CA1018;CA5351;CA1825</NoWarn>
Expand Down Expand Up @@ -44,4 +43,5 @@
<!-- Enables analyzers for this project (this is required since ProjectReference is not transitive). -->
<ProjectReference Include="..\..\src\BenchmarkDotNet.Analyzers\BenchmarkDotNet.Analyzers.csproj" ReferenceOutputAssembly="false" OutputItemType="Analyzer"/>
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
6 changes: 6 additions & 0 deletions samples/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project>
<PropertyGroup>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<IsPackable>false</IsPackable>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@
<_Parameter1>BenchmarkDotNet.Analyzers.Tests,PublicKey=00240000048000009400000006020000002400005253413100040000010001002970bbdfca4d129fc74b4845b239973f1b183684f0d7db5e1de7e085917e3656cf94884803cb800d85d5aae5838fb3f8fd1f2829e8208c4f087afcfe970bce44037ba30a66749cd5514b410ca8a35e9c7d6eb86975853c834c9ad25051537f9a05a0c540c5d84f2c7b32ab01619d84367fd424797ba3242f08b0e6ae75f66dad</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@
</ItemGroup>
</Otherwise>
</Choose>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
<ItemGroup>
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="3.1.21" PrivateAssets="contentfiles;analyzers" />
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
<PackageReference Include="JetBrains.Profiler.SelfApi" Version="2.5.13" />
</ItemGroup>

<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
<PackageReference Include="JetBrains.Profiler.SelfApi" Version="2.5.13" />
</ItemGroup>

<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
<ItemGroup>
<ProjectReference Include="..\BenchmarkDotNet\BenchmarkDotNet.csproj" />
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
<ItemGroup>
<PackageReference Include="ScottPlot" Version="5.0.55" />
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@
<None Include="entrypoints\EntryPoint.*" Pack="true" PackagePath="entrypoints\" />
<None Include="build\BenchmarkDotNet.TestAdapter.props" Pack="true" PackagePath="build\" />
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
2 changes: 2 additions & 0 deletions src/BenchmarkDotNet.Weaver/BenchmarkDotNet.Weaver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ then run `build.cmd pack-weaver`.
<Content Include="$(OutputPath)**\*.dll" Pack="true" PackagePath="tasks/$(TargetFramework)" />
<None Remove="packages\**" />
</ItemGroup>

<Import Project="..\..\build\common.targets" />
</Project>
1 change: 1 addition & 0 deletions src/BenchmarkDotNet/BenchmarkDotNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
1 change: 1 addition & 0 deletions templates/BenchmarkDotNet.Templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@
MatchExpression='("defaultValue": )"([\d+\.?]+)"'
ReplacementText='${1}"$(VersionPrefix)"' />
</Target>
<Import Project="..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@
<ProjectReference Include="..\..\src\BenchmarkDotNet.Analyzers\BenchmarkDotNet.Analyzers.csproj" />
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>net8.0;net462</TargetFrameworks>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
</PropertyGroup>
Expand All @@ -23,4 +21,5 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.4" />
<Reference Include="System.Runtime" />
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@
<HintPath>customPath\VerySimple.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.4" />
<Reference Include="System.Runtime" />
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.4" />
<Reference Include="System.Runtime" />
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- MSBuild was complaing about InformationalVersion from common.props file, so I excluded them in conditional way -->
<IsFsharp>true</IsFsharp>
</PropertyGroup>
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
Expand All @@ -18,4 +14,5 @@
<PackageReference Update="FSharp.Core" Version="9.0.300" />
<PackageReference Update="System.ValueTuple" Version="4.6.1" />
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.4" />
<Reference Include="System.Runtime" />
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- MSBuild was complaing about some settings from common.props file, so I excluded them in conditional way -->
<IsVisualBasic>true</IsVisualBasic>
</PropertyGroup>
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,5 @@
<LastGenOutput>RunnableVoidCaseBenchmark.cs</LastGenOutput>
</None>
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
1 change: 1 addition & 0 deletions tests/BenchmarkDotNet.Tests/BenchmarkDotNet.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@
<Folder Include="Detectors\" />
<Folder Include="Perfonar\VerifiedFiles\" />
</ItemGroup>
<Import Project="..\..\build\common.targets" />
</Project>
5 changes: 5 additions & 0 deletions tests/Directory.build.props → tests/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<Project>
<PropertyGroup>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<IsPackable>false</IsPackable>
</PropertyGroup>

<!-- ProjectReferences are not transitive, so we need to directly include the analyzers for all test projects. -->
<ItemGroup Condition="'$(AssemblyName)' != 'BenchmarkDotNet.Analyzers.Tests'">
<ProjectReference Include="$(MSBuildThisFileDirectory)..\src\BenchmarkDotNet.Analyzers\BenchmarkDotNet.Analyzers.csproj" ReferenceOutputAssembly="false" OutputItemType="Analyzer" />
Expand Down