Skip to content

Commit 1cb363f

Browse files
committed
exclude Build.csproj from refing the analyzer project!
1 parent 7f7c0b0 commit 1cb363f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Directory.Build.props

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@
4343
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" />
4444
</ItemGroup>
4545

46-
<ItemGroup>
47-
<!-- for everything except the build project itself: use the build project as an analyzer -->
48-
<ProjectReference Condition="'$(AssemblyName)' != 'StackExchange.Redis.Build'"
49-
Include="..\..\eng\StackExchange.Redis.Build\StackExchange.Redis.Build.csproj"
46+
<ItemGroup Condition="'$(MSBuildProjectName)' != 'Build' and '$(MSBuildProjectName)' != 'StackExchange.Redis.Build'">
47+
<!-- for everything except the build-tools project itself and the Build.csproj wrapper: use the build project as an analyzer -->
48+
<ProjectReference Include="..\..\eng\StackExchange.Redis.Build\StackExchange.Redis.Build.csproj"
5049
OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
5150
</ItemGroup>
5251
</Project>

0 commit comments

Comments
 (0)