Skip to content

Commit

Permalink
Merge pull request #1787 from jnyrup/BuildTimes
Browse files Browse the repository at this point in the history
Optimize build times
  • Loading branch information
jnyrup committed Jan 22, 2022
2 parents 85204f7 + eac1373 commit 9b2d8e2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
7 changes: 7 additions & 0 deletions Src/FluentAssertions/FluentAssertions.csproj
@@ -1,4 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- To reduce build times, we only enable analyzers for the newest TFM -->
<PropertyGroup>
<TargetFrameworks>net47;netcoreapp2.1;netcoreapp3.0;netstandard2.0;netstandard2.1</TargetFrameworks>
<SignAssembly>True</SignAssembly>
Expand All @@ -11,6 +12,7 @@
<CodeAnalysisRuleSet>..\..\Rules.ruleset</CodeAnalysisRuleSet>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
</PropertyGroup>
<PropertyGroup>
<Authors>Dennis Doomen;Jonas Nyrup</Authors>
Expand All @@ -29,6 +31,11 @@
<Copyright>Copyright Dennis Doomen 2010-2020</Copyright>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
<RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis>
<RunAnalyzers>false</RunAnalyzers>
</PropertyGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>FluentAssertions.Specs, PublicKey=00240000048000009400000006020000002400005253413100040000010001002d25ff515c85b13ba08f61d466cff5d80a7f28ba197bbf8796085213e7a3406f970d2a4874932fed35db546e89af2da88c194bf1b7f7ac70de7988c78406f7629c547283061282a825616eb7eb48a9514a7570942936020a9bb37dca9ff60b778309900851575614491c6d25018fadb75828f4c7a17bf2d7dc86e7b6eafc5d8f</_Parameter1>
Expand Down
27 changes: 14 additions & 13 deletions Tests/FluentAssertions.Specs/FluentAssertions.Specs.csproj
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<!-- To reduce build times, we only enable analyzers for the newest TFM -->
<PropertyGroup>
<TargetFrameworks>net47;net5.0;netcoreapp2.0;netcoreapp2.1;netcoreapp3.0</TargetFrameworks>
<LangVersion>9.0</LangVersion>
Expand All @@ -8,24 +9,24 @@
<IsPackable>false</IsPackable>
<CodeAnalysisRuleSet>..\..\TestRules.ruleset</CodeAnalysisRuleSet>
<!-- https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA0001.md -->
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
<DocumentationFile Condition="'$(TargetFramework)' == 'net5.0'">$(OutputPath)$(AssemblyName).xml</DocumentationFile>
<NoWarn>$(NoWarn),IDE0052,1573,1591,1712</NoWarn>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>full</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' != 'net5.0'">
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
<RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis>
<RunAnalyzers>false</RunAnalyzers>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0' ">
<Compile Remove="Events\*.cs" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugType>full</DebugType>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net47'">
<ItemGroup Condition="'$(TargetFramework)' == 'net47'">
<!--
(SRCU = System.Runtime.CompilerServices.Unsafe)
FluentAssertions.csproj depends on SRCU 4.5.0 (AssemblyVersion 4.0.4.0)
Expand All @@ -40,14 +41,14 @@
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<PackageReference Include="xunit.runner.visualstudio" Version="[2.4.1]">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' Or '$(TargetFramework)' == 'netcoreapp3.0' or '$(TargetFramework)' == 'net5.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1' Or '$(TargetFramework)' == 'netcoreapp3.0' or '$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -63,7 +64,7 @@
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit 9b2d8e2

Please sign in to comment.