Skip to content

Commit 43af730

Browse files
committed
Another references change
1 parent 6485aab commit 43af730

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/PublicInterfaceGenerator/PublicInterfaceGenerator.csproj

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!--Mark the nuget as a dev dependency, so any projects using this nuget don't auto pull in this project-->
88
<DevelopmentDependency>true</DevelopmentDependency>
99
<IsPackable>true</IsPackable>
10-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
10+
<!--<GeneratePackageOnBuild>true</GeneratePackageOnBuild>-->
1111
<!--Skip Package Analysis because it'll complain we don't have any files at the "lib/netstandard2.0" path, which is okay because this is a source generator-->
1212
<NoPackageAnalysis>true</NoPackageAnalysis>
1313
</PropertyGroup>
@@ -36,17 +36,23 @@
3636
<ItemGroup>
3737
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all" />
3838
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.13.0" PrivateAssets="all" />
39+
</ItemGroup>
3940

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" />
4045
</ItemGroup>
46+
4147
<ItemGroup>
42-
<!-- Generator dependencies -->
48+
<!-- Anyone using the generator needs to use the attributes NuGet so any reflection doesn't throw when it sees the attributes in code -->
4349
<PackageReference Include="ProgrammerAl.SourceGenerators.PublicInterfaceGenerator.Attributes" Version="*" />
4450

4551
<!-- Package the generator in the analyzer directory of the nuget package -->
4652
<None Include="$(OutputPath)/$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
4753

48-
<!-- Pack the attributes dll in the lib\netstandard2.0 path so the library consuming this nuget can use it -->
49-
<!--<None Include="$(OutputPath)/ProgrammerAl.SourceGenerators.PublicInterfaceGenerator.Attributes.dll" Pack="true" PackagePath="lib/netstandard2.0" Visible="true" />-->
54+
<!--Pack the attributes dll in the lib\netstandard2.0 path so the library consuming this nuget can use it-->
55+
<None Include="$(OutputPath)/ProgrammerAl.SourceGenerators.PublicInterfaceGenerator.Attributes.dll" Pack="true" PackagePath="lib/netstandard2.0" Visible="true" />
5056

5157
<None Include="../../README.md" Pack="true" PackagePath="/" />
5258
</ItemGroup>

0 commit comments

Comments
 (0)