Skip to content

Commit 3930d93

Browse files
author
alliscode
committed
Another attempt to allow the pipeline to pack the generators project.
1 parent 8aa0103 commit 3930d93

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

dotnet/src/Microsoft.Agents.AI.Workflows.Generators/Microsoft.Agents.AI.Workflows.Generators.csproj

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
<IsRoslynComponent>true</IsRoslynComponent>
1717
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
1818

19-
<!-- Place build output in analyzers folder for NuGet package -->
20-
<IncludeBuildOutput>true</IncludeBuildOutput>
21-
<BuildOutputTargetFolder>analyzers/dotnet/cs</BuildOutputTargetFolder>
19+
<!-- Don't include build output in lib folder -->
20+
<IncludeBuildOutput>false</IncludeBuildOutput>
2221
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
2322

2423
<!-- Suppress nullable warnings for netstandard2.0 -->
@@ -51,4 +50,16 @@
5150
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" VersionOverride="3.3.4" PrivateAssets="all" />
5251
</ItemGroup>
5352

53+
<ItemGroup>
54+
<!-- Include the analyzer DLL using the correct target framework path -->
55+
<None Include="$(OutputPath)$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
56+
<None Include="$(OutputPath)$(AssemblyName).pdb" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
57+
</ItemGroup>
58+
59+
<!-- Ensure the files exist before packing -->
60+
<Target Name="EnsureAnalyzerAssembliesExist" BeforeTargets="GenerateNuspec">
61+
<Error Condition="!Exists('$(OutputPath)$(AssemblyName).dll')"
62+
Text="Analyzer assembly not found at: $(OutputPath)$(AssemblyName).dll" />
63+
</Target>
64+
5465
</Project>

0 commit comments

Comments
 (0)