|
38 | 38 | <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.13.0" PrivateAssets="all" />
|
39 | 39 | </ItemGroup>
|
40 | 40 |
|
| 41 | + <!--<ItemGroup> |
| 42 | + <PackageReference Include="ProgrammerAl.SourceGenerators.PublicInterfaceGenerator.Attributes" Version="*" GeneratePathProperty="true" PrivateAssets="all" /> |
| 43 | + </ItemGroup>--> |
41 | 44 | <!-- Reference the attributes from the generator to compile against them -->
|
42 | 45 | <!-- Ensure we specify PrivateAssets so the NuGet doesn't have any dependencies -->
|
43 |
| - <ItemGroup> |
| 46 | + <!--<ItemGroup> |
44 | 47 | <ProjectReference Include="..\PublicInterfaceGenerator.Attributes\PublicInterfaceGenerator.Attributes.csproj" PrivateAssets="All" />
|
45 |
| - </ItemGroup> |
46 |
| - |
| 48 | + </ItemGroup>--> |
| 49 | + |
47 | 50 | <ItemGroup>
|
48 | 51 | <!-- Anyone using the generator needs to use the attributes NuGet so any reflection doesn't throw when it sees the attributes in code -->
|
49 |
| - <PackageReference Include="ProgrammerAl.SourceGenerators.PublicInterfaceGenerator.Attributes" Version="*" /> |
| 52 | + <PackageReference Include="ProgrammerAl.SourceGenerators.PublicInterfaceGenerator.Attributes" Version="*" GeneratePathProperty="true" /> |
50 | 53 |
|
51 | 54 | <!-- Package the generator in the analyzer directory of the nuget package -->
|
52 | 55 | <None Include="$(OutputPath)/$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
|
53 | 56 |
|
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" /> |
| 57 | + <!--Pack the attributes dll in the lib\netstandard2.0 path so the library consuming this nuget can use it--> |
| 58 | + <!--<None Include="$(OutputPath)/ProgrammerAl.SourceGenerators.PublicInterfaceGenerator.Attributes.dll" Pack="true" PackagePath="lib/netstandard2.0" Visible="true" />--> |
56 | 59 |
|
57 | 60 | <None Include="../../README.md" Pack="true" PackagePath="/" />
|
58 | 61 | </ItemGroup>
|
59 | 62 |
|
| 63 | + <PropertyGroup> |
| 64 | + <GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargetPaths</GetTargetPathDependsOn> |
| 65 | + </PropertyGroup> |
| 66 | + |
| 67 | + <Target Name="GetDependencyTargetPaths"> |
| 68 | + <ItemGroup> |
| 69 | + <TargetPathWithTargetPlatformMoniker Include="$(PKGProgrammerAl_SourceGenerators_PublicInterfaceGenerator_Attributes)\lib\netstandard2.0\ProgrammerAl.SourceGenerators.PublicInterfaceGenerator.Attributes.dll" IncludeRuntimeDependency="false" /> |
| 70 | + </ItemGroup> |
| 71 | + </Target> |
| 72 | + |
60 | 73 | <PropertyGroup>
|
61 | 74 | <NuGetAudit>true</NuGetAudit>
|
62 | 75 | <NuGetAuditMode>all</NuGetAuditMode>
|
|
0 commit comments