<Project>
- <PropertyGroup>
- <!-- Need to keep in sync with Tools.props file. -->
- <AnalyzerPropsFile>$(ToolSetCommonDirectory)Tools.Analyzers.props</AnalyzerPropsFile>
- </PropertyGroup>
-
<Import Condition="Exists($(AnalyzerPropsFile)) AND '$(EnableAnalyzers)' == 'true'" Project="$(AnalyzerPropsFile)" />
<!-- This target is executed when building a project and EnableAnalyzers property is set to true.
--- /dev/null
+<Project>
+ <PropertyGroup>
+ <BuildConfigurations>
+ netstandard;
+ </BuildConfigurations>
+ </PropertyGroup>
+</Project>
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <EnableBinPlacing>false</EnableBinPlacing>
+ <Language>C#</Language>
+ </PropertyGroup>
+
+ <!-- Import PackageReferences containing analyzers -->
+ <Import Project="$(RepositoryEngineeringDir)Analyzers.props" />
+
+ <UsingTask TaskName="Microsoft.DotNet.Arcade.Sdk.SaveItems" AssemblyFile="$(ArcadeSdkBuildTasksAssembly)" />
+
+ <Target Name="GenerateAnalyzersPropsFile"
+ AfterTargets="ResolveLockFileAnalyzers">
+
+ <SaveItems Condition="'@(Analyzer)' != ''"
+ ItemName="ResolvedAnalyzer"
+ Items="@(Analyzer)"
+ File="$(AnalyzerPropsFile)" />
+ </Target>
+</Project>
<AdditionalBuildConfigurations>$(AdditionalBuildConfigurations);netstandard-$(OSGroup)-$(ConfigurationGroup)-$(ArchGroup)</AdditionalBuildConfigurations>
</PropertyGroup>
- <!-- Build for all configurations -->
<ItemGroup>
+ <Project Condition="'$(DotNetBuildFromSource)' != 'true'" Include="analyzers/analyzers.depproj" />
+
+ <!-- Build for all configurations -->
<Project Condition="'$(BuildAllConfigurations)' == 'true'" Include="netcoreapp/netcoreapp.depproj" />
<Project Include="netstandard/netstandard.depproj" />
<Project Include="netfx/netfx.depproj" />
<!-- Enable the repo-restored analyzers -->
<PropertyGroup>
+ <AnalyzerPropsFile>$(ToolSetCommonDirectory)Tools.Analyzers.props</AnalyzerPropsFile>
<EnableAnalyzers Condition="'$(EnableAnalyzers)' == '' and '$(IsSourceProject)' == 'true'">true</EnableAnalyzers>
</PropertyGroup>