Visitar URL original
Fix the errant package dependency in source generator package by AArnott · Pull Request #1622 · MessagePack-CSharp/MessagePack-CSharp · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
<Content Include="tools\*.ps1" Pack="true" PackagePath="tools\" />
<None Remove="tools\*.ps1" />
</ItemGroup>
<ItemDefinitionGroup>
<PackageReference>
<!-- We need this, even with SuppressDependenciesWhenPacking=true because the
dependencies will otherwise show up as dependencies in packages built by projects
that reference this one. Probably due to transitive pinning. -->
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemDefinitionGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" />
</ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion src/SourceGenerator.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MessagePack.Analyzers\MessagePack.Analyzers.csproj" PrivateAssets="none" IncludeAssets="analyzers" />
<!-- Source generators need the analyzers assembly at compile-time and runtime.
At runtime we need it added as an analyzer, so we must also depend on the project that produces the nuget package. -->
<ProjectReference Include="..\MessagePack.Analyzers\MessagePack.Analyzers.csproj" PrivateAssets="all" />
<ProjectReference Include="..\MessagePack.Analyzers.CodeFixes\MessagePack.Analyzers.CodeFixes.csproj" PrivateAssets="none" />
</ItemGroup>
</Project>