Skip to content

Commit 70adeaa

Browse files
shimatclaude
andcommitted
Fix: include OpenCvSharp.Analyzers.dll in NuGet package under analyzers/dotnet/cs/
OutputItemType="Analyzer" on a ProjectReference enables the analyzer during in-solution builds but does not cause the DLL to be packaged into the NuGet package. Add an explicit None item with Pack=true and PackagePath=analyzers/dotnet/cs so that the Roslyn analyzers (OCVS001–OCVS005) are active for consumers of the OpenCvSharp4 NuGet package. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d453d25 commit 70adeaa

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/OpenCvSharp/OpenCvSharp.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,17 @@
4646
</ItemGroup>
4747

4848
<ItemGroup>
49-
<!-- Include the analyzer in this package under analyzers/dotnet/cs/ -->
49+
<!-- OutputItemType="Analyzer" enables the analyzer during in-solution builds.
50+
The None item below is also required to place the DLL under analyzers/dotnet/cs/
51+
inside the NuGet package; OutputItemType alone does not trigger packaging. -->
5052
<ProjectReference Include="..\OpenCvSharp.Analyzers\OpenCvSharp.Analyzers.csproj"
5153
ReferenceOutputAssembly="false"
5254
OutputItemType="Analyzer"
5355
SetTargetFramework="TargetFramework=netstandard2.0" />
56+
<None Include="..\OpenCvSharp.Analyzers\bin\$(Configuration)\netstandard2.0\OpenCvSharp.Analyzers.dll"
57+
Pack="true"
58+
PackagePath="analyzers/dotnet/cs"
59+
Visible="false" />
5460
</ItemGroup>
5561
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1'">
5662
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.2" />

0 commit comments

Comments
 (0)