Skip to content

Auto-remove manual NuGet.* version pins on future major versions - #666

Open
ITaluone wants to merge 8 commits into
Fallout-build:developfrom
ITaluone:feat/migration/add-nuget.framework-pin
Open

ITaluone wants to merge 8 commits into
Fallout-build:developfrom
ITaluone:feat/migration/add-nuget.framework-pin

Conversation

@ITaluone

@ITaluone ITaluone commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Removes obsolete explicit NuGet package pins from project files during migration.

What changed

  • Removes versioned NuGet.Frameworks references from every *.csproj file.
  • For Fallout 11 or later, also removes versioned NuGet.Protocol, NuGet.Packaging, and NuGet.Resolver references.
  • Keeps those three related package pins when migrating to Fallout 10.x.
  • Leaves unversioned references and unrelated packages unchanged.

Why

Fallout now aligns its NuGet dependencies with the versions loaded by the .NET SDK. Explicit project-level pins are no longer needed and can cause version conflicts. The related NuGet pins remain in place for Fallout 10.x and are removed when migrating to Fallout 11 or later.

Addresses #638 (the NuGet package workaround). Follow-up to #677 (the SDK NuGet version alignment).

@ITaluone
ITaluone requested a review from a team as a code owner August 29, 2026 15:35
@dennisdoomen
dennisdoomen marked this pull request as draft August 30, 2026 11:21
@dennisdoomen

Copy link
Copy Markdown
Collaborator

I'm going to park this one until we have settled on a path in #638. Also, upgrades between 10.x must always be backwards compatible and fallout-migrate is only supposed to be used between Nuke -> Fallout 10 -> Fallout 10 + 1.

@IT-VBFK

IT-VBFK commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Ok.. but why this shouldn't be backwards compatible? The one and only reason for this is to stay without breaking changes (or in other words: be prepared for .NET 10.0.400 SDK upgrade in consumer projects)

I did this for two projects to be able to move forward to 10.0.400.

@dennisdoomen

Copy link
Copy Markdown
Collaborator

Ok.. but why this shouldn't be backwards compatible? The one and only reason for this is to stay without breaking changes (or in other words: be prepared for .NET 10.0.400 SDK upgrade in consumer projects)

I don't understand your point. It's just that I want to make sure that we're not going to misuse fallout-migrate for fixing breaking changes in the v10 stream.

@IT-VBFK

IT-VBFK commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

😆

Ok.. I don't get it either, because it is no breaking change in the v10 stream, but a potential breaking change (which this could prevent) in the consumer's repos when upgrading to 10.0.400..

@dennisdoomen

Copy link
Copy Markdown
Collaborator

Getting back to this PR, the way I interpret it is that it doesn't solve the problem unless people use fallout-migrate, right? Because the point of fallout-migrate is to either help move people from Nuke to Fallout, or from one major version of Fallout to the next. It is not meant to be used for minor versions as Fallout is supposed to support Semantic Versioning.

And I don't see the "pin" this PR talks about.

So can we just do what I suggested here so that people bumping the Fallout packages from 10.4 to 10.5 will get the fix automatically?

@IT-VBFK

IT-VBFK commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Line 331-336 adds the pin with a descriptive comment

@IT-VBFK

IT-VBFK commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

So can we just do what I suggested #638 (comment) so that people bumping the Fallout packages from 10.4 to 10.5 will get the fix automatically?

Sure, if this works :)

@dennisdoomen

Copy link
Copy Markdown
Collaborator

Line 331-336 adds the pin with a descriptive comment

That's fallout-migrate. That will not play a role until we move to v11.

Sure, if this works :)

Why the smiley? You don't think that will work?

@IT-VBFK

IT-VBFK commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Hmm.. not sure.

Because of the .netstandard2.0 "burden". Otherwise, everything netstandard2.0 related here makes no sense.

@dennisdoomen dennisdoomen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did some testing. After #677, the pin isn't necessary anymore. But we could still have this migration step to remove it when people upgrade to version 10.5 or higher. However, it needs to become a separate step. That RewriteCsprojsStep is already exploding.

@ITaluone

Copy link
Copy Markdown
Contributor Author

ok.. should I also remove explicit pins for NuGet.Packaging / NuGet.Protocol / NuGet.Resolver in case anyone has this pins, since they would break the compilation after migration.

@ITaluone
ITaluone force-pushed the feat/migration/add-nuget.framework-pin branch from 0750890 to 44beaee Compare September 21, 2026 06:55
@ITaluone
ITaluone marked this pull request as ready for review September 21, 2026 06:56
@dennisdoomen

Copy link
Copy Markdown
Collaborator

ok.. should I also remove explicit pins for NuGet.Packaging / NuGet.Protocol / NuGet.Resolver in case anyone has this pins, since they would break the compilation after migration.

Why would they break compilation?

@ITaluone

Copy link
Copy Markdown
Contributor Author

Why would they break compilation?

Hmm.. true, but still unnecessary though. Remove or leave alone?

@dennisdoomen

Copy link
Copy Markdown
Collaborator

Hmm.. true, but still unnecessary though. Remove or leave alone?

If people have been adding it to work around the .NET 10.0.400 issue, it might be nice to have fallout-migrate remove it when we move to v11.

@ITaluone

Copy link
Copy Markdown
Contributor Author

So, not like now, but a v11 migration only?

@dennisdoomen

Copy link
Copy Markdown
Collaborator

So, not like now, but a v11 migration only?

Yes, as the migration tool is only expected to be used to migrate from Nuke->Fallout or between major Fallout versions.

@ITaluone ITaluone changed the title Pin NuGet.Framework for .NET SDK 10.0.400; auto-remove on future major versions Auto-remove manual NuGet.* version pins on future major versions Sep 25, 2026

@dennisdoomen dennisdoomen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧🤖 The PR description still describes inserting a delete-at-v11 marker block into _build.csproj, but the PR now only removes pins. Please rewrite it for the two removal steps and their version gating.

Comment thread src/Fallout.Migrate/Steps/RemoveNugetFrameworkPinStep.cs
Comment thread src/Fallout.Migrate/Steps/RemoveNugetFrameworkPinStep.cs
Comment thread src/Fallout.Migrate/Steps/RemoveNugetFrameworkPinStep.cs
Comment thread src/Fallout.Migrate/Steps/RemoveNugetFrameworkPinStep.cs Outdated
/// </summary>
internal sealed class RemoveNugetFrameworkPinStep : IMigrationStep
{
private static readonly Regex explicitPinPattern = new(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓🤖 Under central package management the pin is a <PackageVersion> in Directory.Packages.props, which neither step reads. Is that acceptable, or should it build on #694 (#694), which adds *.props support to the migration?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think when #694 is merged this should work out of the box, doesn't it?

Comment thread src/Fallout.Migrate/Steps/RemoveRelatedNugetPinsStep.cs Outdated
Soli Deo Gloria
@ITaluone
ITaluone force-pushed the feat/migration/add-nuget.framework-pin branch from a7f2c17 to 963b769 Compare October 15, 2026 11:45
@ITaluone
ITaluone requested a review from dennisdoomen October 15, 2026 13:12

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants