fix(generator): fix NuGet package to include generator DLL #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes critical packaging issue where the source generator DLL was not being included in the NuGet package, causing the generator to not run when consumed from NuGet.org.
Changes
Fixed Generator Packaging
@(IntermediateAssembly)to$(OutputPath)\$(AssemblyName).dllin the pack configuration@(IntermediateAssembly)approach doesn't work reliably during the pack phaseanalyzers/dotnet/cs/folder in the NuGet packageImpact
Checklist
Related Issues/PRs
Related to PR #7 - this fixes the packaging configuration that was added in that PR.
Reviewer Notes
Verification Steps:
task packto build the NuGet packageunzip -l ./nupkg/LayeredCraft.SourceGeneratorTools.Generator.0.1.0-alpha.nupkganalyzers/dotnet/cs/LayeredCraft.SourceGeneratorTools.Generator.dllexists in the package (37KB)Root Cause:
The
@(IntermediateAssembly)MSBuild item doesn't resolve properly during the pack phase, resulting in an empty<None>include that silently fails.Fix:
Using
$(OutputPath)\$(AssemblyName).dlldirectly references the built DLL from the output directory, which works correctly during pack.