Skip to content

Commit 2820112

Browse files
committed
Another reference change
1 parent c3880ad commit 2820112

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

src/PublicInterfaceGenerator/PublicInterfaceGenerator.csproj

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,32 @@
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+
40+
<!-- Generator dependencies -->
41+
<PackageReference Include="ProgrammerAl.SourceGenerators.PublicInterfaceGenerator.Attributes" Version="*" GeneratePathProperty="true" PrivateAssets="all" />
3942
</ItemGroup>
40-
<!-- Reference the attributes from the generator to compile against them -->
41-
<!-- Ensure we specify PrivateAssets so the NuGet doesn't have any dependencies -->
42-
<ItemGroup>
43-
<ProjectReference Include="..\PublicInterfaceGenerator.Attributes\PublicInterfaceGenerator.Attributes.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="true" />
44-
</ItemGroup>
43+
44+
<PropertyGroup>
45+
<GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargetPaths</GetTargetPathDependsOn>
46+
</PropertyGroup>
47+
48+
<Target Name="GetDependencyTargetPaths">
49+
<ItemGroup>
50+
<TargetPathWithTargetPlatformMoniker Include="$(PKGProgrammerAl_SourceGenerators_PublicInterfaceGenerator_Attributes)\lib\netstandard2.0\ProgrammerAl.SourceGenerators.PublicInterfaceGenerator.Attributes.dll" IncludeRuntimeDependency="false" />
51+
</ItemGroup>
52+
</Target>
53+
4554
<ItemGroup>
4655
<!-- Package the generator in the analyzer directory of the nuget package -->
47-
<None Include="$(OutputPath)/$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
56+
<!--<None Include="$(OutputPath)/$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />-->
4857

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

5262
<None Include="../../README.md" Pack="true" PackagePath="/" />
5363
</ItemGroup>
64+
5465
<PropertyGroup>
5566
<NuGetAudit>true</NuGetAudit>
5667
<NuGetAuditMode>all</NuGetAuditMode>

0 commit comments

Comments
 (0)