Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eng/generators.targets')
-rw-r--r--eng/generators.targets17
1 files changed, 9 insertions, 8 deletions
diff --git a/eng/generators.targets b/eng/generators.targets
index 69c3c12cbb4..c123ad66387 100644
--- a/eng/generators.targets
+++ b/eng/generators.targets
@@ -41,17 +41,18 @@
That is required as the EnabledGenerators condition checks on the Reference and ProjectReference items and hence can't be a property condition. -->
<ItemGroup Condition="'@(EnabledGenerators)' != '' and
@(EnabledGenerators->AnyHaveMetadataValue('Identity', 'LibraryImportGenerator'))">
- <ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj;
- $(LibrariesProjectRoot)System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj"
- OutputItemType="Analyzer"
- ReferenceOutputAssembly="false" />
+ <AnalyzerReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj;
+ $(LibrariesProjectRoot)System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj" />
</ItemGroup>
- <!-- Use a normal property condition as this source generator is opt-in and doesn't read from an item list. -->
- <ItemGroup Condition="'$(EnableRegexGenerator)' == 'true'">
- <ProjectReference Include="$(LibrariesProjectRoot)System.Text.RegularExpressions\gen\System.Text.RegularExpressions.Generator.csproj"
+ <!-- AnalyzerReference items are transformed to ProjectReferences with the required analyzer metadata. -->
+ <ItemGroup>
+ <ProjectReference Include="@(AnalyzerReference)"
+ ReferenceOutputAssembly="false"
OutputItemType="Analyzer"
- ReferenceOutputAssembly="false" />
+ Pack="false" />
+ <ProjectReference Update="@(AnalyzerReference->WithMetadataValue('ReferenceAnalyzer', 'false'))"
+ OutputItemType="" />
</ItemGroup>
<Target Name="ConfigureGenerators"