Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable packing legacy PackageReference projects without the need for a package (ie merge NuGet.Build.Tasks.Pack into NuGet.Build.Tasks) #14046

Open
nkolev92 opened this issue Jan 16, 2025 · 2 comments
Labels
Functionality:Pack TechDebt Technical debt Type:DCR Design Change Request

Comments

@nkolev92
Copy link
Member

The PackageReference functionality has 2 targets, restore and pack, which are deliver by 2 separate packages/targets files created by NuGet.Build.Tasks and NuGet.Build.Tasks.Pack and

We have 2 types of PackageReference functionality, SDK projects and classic csproj projects.

For SDK projects, they're both available by default, although they're imported from 2 different places.
For legacy projects, the restore target is available , but the pack target is not. It requires you to add a PR to NuGet.Build.Tasks.Pack.

Another feature of NuGet.Build.Tasks.Pack is that it allows you to overwrite the default pack targets, allowing for faster onboarding for pack fixes.

Beyond the UX, the issue with pack and restore being separate is that pack is ilmerged, so we're effectively shipping duplicates of most assemblies.
We should decide whether we want to preserve the bootstrapping ability of NuGet.Build.Tasks(.Pack) or if it's sufficient to just make it available in all relevant scenarios.
Final consideration is that making the pack targets available for all legacy projects could cause a different behavior when people run the "pack" target, so we'd need to consider whether we condition the import for legacy projects on something.

@nkolev92 nkolev92 added Type:DCR Design Change Request Functionality:Pack TechDebt Technical debt labels Jan 16, 2025
@nkolev92
Copy link
Member Author

nkolev92 commented Jan 16, 2025

cc @zivkan @jeffkl

If we do this, we don't need: #13079.

@nkolev92
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Pack TechDebt Technical debt Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

1 participant