Skip to content

Commit fd1f906

Browse files
Merge pull request #472 from tannergooding/tmp2
Ensure that various analyzers aren't enabled for .NET Standard
2 parents 32bbe8a + a4d05f8 commit fd1f906

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Directory.Build.props

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@
4242
<BaseOutputPath>$(BaseArtifactsPath)bin/$(BaseArtifactsPathSuffix)/</BaseOutputPath>
4343
<Company>.NET Foundation</Company>
4444
<ContinuousIntegrationBuild Condition="'$(GITHUB_RUN_ID)' != ''">true</ContinuousIntegrationBuild>
45-
<EnableAotAnalyzer>true</EnableAotAnalyzer>
46-
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
47-
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
4845
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
4946
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(Configuration)/</PackageOutputPath>
5047
<PackageValidationBaselineVersion>16.0.0</PackageValidationBaselineVersion>
@@ -55,6 +52,12 @@
5552
<VersionSuffix Condition="'$(GITHUB_EVENT_NAME)' == 'pull_request'">pr</VersionSuffix>
5653
</PropertyGroup>
5754

55+
<!-- Default settings that explicitly differ for .NETCoreApp -->
56+
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
57+
<EnableAotAnalyzer>true</EnableAotAnalyzer>
58+
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
59+
</PropertyGroup>
60+
5861
<!-- Default settings that are otherwise undefined -->
5962
<PropertyGroup>
6063
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Open.snk</AssemblyOriginatorKeyFile>

Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</PropertyGroup>
2727

2828
<!-- Settings that are only set for libraries -->
29-
<PropertyGroup Condition="'$(OutputType)' == 'Library'">
29+
<PropertyGroup Condition="'$(OutputType)' == 'Library' AND '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
3030
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
3131
<IsTrimmable>true</IsTrimmable>
3232
</PropertyGroup>

0 commit comments

Comments
 (0)