Skip to content

Commit ad2e167

Browse files
committed
Another update
1 parent 43af730 commit ad2e167

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

samples/Samples/Samples.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@
1010
<ProjectReference Include="..\..\src\PublicInterfaceGenerator\PublicInterfaceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
1111
<ProjectReference Include="..\..\src\PublicInterfaceGenerator.Attributes\PublicInterfaceGenerator.Attributes.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="true" />
1212
</ItemGroup>
13-
1413
</Project>

src/PublicInterfaceGenerator/PublicInterfaceGenerator.csproj

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,38 @@
3838
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.13.0" PrivateAssets="all" />
3939
</ItemGroup>
4040

41+
<!--<ItemGroup>
42+
<PackageReference Include="ProgrammerAl.SourceGenerators.PublicInterfaceGenerator.Attributes" Version="*" GeneratePathProperty="true" PrivateAssets="all" />
43+
</ItemGroup>-->
4144
<!-- Reference the attributes from the generator to compile against them -->
4245
<!-- Ensure we specify PrivateAssets so the NuGet doesn't have any dependencies -->
43-
<ItemGroup>
46+
<!--<ItemGroup>
4447
<ProjectReference Include="..\PublicInterfaceGenerator.Attributes\PublicInterfaceGenerator.Attributes.csproj" PrivateAssets="All" />
45-
</ItemGroup>
46-
48+
</ItemGroup>-->
49+
4750
<ItemGroup>
4851
<!-- 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" />
5053

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

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" />-->
5659

5760
<None Include="../../README.md" Pack="true" PackagePath="/" />
5861
</ItemGroup>
5962

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+
6073
<PropertyGroup>
6174
<NuGetAudit>true</NuGetAudit>
6275
<NuGetAuditMode>all</NuGetAuditMode>

0 commit comments

Comments
 (0)