Skip to content

Commit 59b94e4

Browse files
authored
Ensure analyzer does not appear in build and publish outputs (#24072)
Also make the analyzer actually work
1 parent 427bfc8 commit 59b94e4

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@
153153
AND '$(MSBuildProjectExtension)' == '.csproj'">
154154
<ProjectReference
155155
Include="$(RepoRoot)src\Analyzers\Internal.AspNetCore.Analyzers\src\Internal.AspNetCore.Analyzers.csproj"
156+
ReferenceOutputAssembly="false"
157+
OutputItemType="Analyzer"
156158
PrivateAssets="All"
157159
Version="$(InternalAspNetCoreAnalyzersPackageVersion)"
158160
IsImplicitlyDefined="true" />

eng/tools/RepoTasks/RepoTasks.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
2626
<PackageReference Include="Wix" Version="3.11.1" />
27+
<PackageReference Include="System.Net.Http" Version="4.3.4" />
2728

2829
<Reference Include="Microsoft.Build" />
2930
<Reference Include="Microsoft.Build.Framework" />

src/Analyzers/Internal.AspNetCore.Analyzers/src/Internal.AspNetCore.Analyzers.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<BuildOutputTargetFolder>analyzers/dotnet/cs/</BuildOutputTargetFolder>
99
<!--
1010
Except for analyzer unit tests, analyzers should not be referenced by other projects in this repo. Analyzers cannot be used as
11-
a project reference. The SDK currently only supports using analyzers as a PackageReference. This flag prevents this project from
11+
a project reference unless referenced with OutputItemType="Analyzer". The SDK currently only supports using analyzers as a PackageReference. This flag prevents this project from
1212
being used as a `<Reference>`, which indicates that a reference is interchangeable between ProjectRef and PackageRef.
1313
-->
1414
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>

0 commit comments

Comments
 (0)