Skip to content

Commit 0191f3d

Browse files
committed
Changed how attributes dll is referenced
1 parent 835dd98 commit 0191f3d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/PublicInterfaceGenerator/PublicInterfaceGenerator.csproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,18 @@
3838
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.13.0" PrivateAssets="all" />
3939
<PackageReference Include="ProgrammerAl.SourceGenerators.PublicInterfaceGenerator.Attributes" Version="*" />
4040
</ItemGroup>
41+
<!-- Reference the attributes from the generator to compile against them -->
42+
<!-- Ensure we specify PrivateAssets so the NuGet doesn't have any dependencies -->
43+
<ItemGroup>
44+
<ProjectReference Include="..\PublicInterfaceGenerator.Attributes\PublicInterfaceGenerator.Attributes.csproj" PrivateAssets="All" />
45+
</ItemGroup>
4146
<ItemGroup>
4247
<!-- Package the generator in the analyzer directory of the nuget package -->
4348
<None Include="$(OutputPath)/$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
4449

50+
<!-- Pack the attributes dll in the lib\netstandard2.0 path so the library consuming this nuget can use it -->
51+
<None Include="$(OutputPath)/ProgrammerAl.SourceGenerators.PublicInterfaceGenerator.Attributes.dll" Pack="true" PackagePath="lib/netstandard2.0" Visible="true" />
52+
4553
<None Include="../../README.md" Pack="true" PackagePath="/" />
4654
</ItemGroup>
4755
<PropertyGroup>

0 commit comments

Comments
 (0)