Ensure analyzer does not appear in build and publish outputs (#24072)

Also make the analyzer actually work
This commit is contained in:
Pranav K 2020-07-17 13:20:52 -07:00 committed by GitHub
parent 427bfc8d6b
commit 59b94e4b92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -153,6 +153,8 @@
AND '$(MSBuildProjectExtension)' == '.csproj'">
<ProjectReference
Include="$(RepoRoot)src\Analyzers\Internal.AspNetCore.Analyzers\src\Internal.AspNetCore.Analyzers.csproj"
ReferenceOutputAssembly="false"
OutputItemType="Analyzer"
PrivateAssets="All"
Version="$(InternalAspNetCoreAnalyzersPackageVersion)"
IsImplicitlyDefined="true" />

View File

@ -24,6 +24,7 @@
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<PackageReference Include="Wix" Version="3.11.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<Reference Include="Microsoft.Build" />
<Reference Include="Microsoft.Build.Framework" />

View File

@ -8,7 +8,7 @@
<BuildOutputTargetFolder>analyzers/dotnet/cs/</BuildOutputTargetFolder>
<!--
Except for analyzer unit tests, analyzers should not be referenced by other projects in this repo. Analyzers cannot be used as
a project reference. The SDK currently only supports using analyzers as a PackageReference. This flag prevents this project from
a project reference unless referenced with OutputItemType="Analyzer". The SDK currently only supports using analyzers as a PackageReference. This flag prevents this project from
being used as a `<Reference>`, which indicates that a reference is interchangeable between ProjectRef and PackageRef.
-->
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>