-
-
Notifications
You must be signed in to change notification settings - Fork 754
Closed
Milestone
Description
Bug description
The analyzer does not produce any diagnostics if only MessagePack.Annotations (instead of the "full" MessagePack) is referenced.
Repro steps
*.csproj
<ItemGroup>
<PackageReference Include="MessagePack.Annotations" Version="2.5.124" />
<PackageReference Include="MessagePackAnalyzer" Version="2.5.124">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
Foo.cs
using MessagePack;
namespace XYZ;
[MessagePackObject]
public class Foo
{
[Key(0)]
public int Foo1 { get; set; }
// NOTE: No diagnostic reported!
public int Foo2 { get; set; }
}
Expected behavior
MsgPack004-Diagonsitc reported on Foo.Foo2.
Actual behavior
No diagonstic is reported.
Additional context
If you change <PackageReference Include="MessagePack.Annotations" Version="2.5.124" /> to <PackageReference Include="MessagePack" Version="2.5.124" /> it works as expected (but I don`t want to do this).
Metadata
Metadata
Assignees
Labels
No labels