Skip to content

Fixes conflicting versions#2214

Merged
PhenX merged 3 commits into
mainfrom
feature/improve-version-handling
Jan 2, 2026
Merged

Fixes conflicting versions#2214
PhenX merged 3 commits into
mainfrom
feature/improve-version-handling

Conversation

@PhenX

@PhenX PhenX commented Jan 2, 2026

Copy link
Copy Markdown
Collaborator

When trying to update FM to 7.2.0 in an application targetting net8.0 and using 8.0 microsoft package versions, we got version conflicts.

This fixes it and also remove redundencies in msbuild files

…nd using 8.0 microsoft package versions and fix unnecessary package version repetition
@github-actions

github-actions Bot commented Jan 2, 2026

Copy link
Copy Markdown

Test Results

    2 files  ±0      2 suites  ±0   37s ⏱️ ±0s
5 396 tests ±0  5 064 ✅ ±0  332 💤 ±0  0 ❌ ±0 
5 877 runs  ±0  5 281 ✅ ±0  596 💤 ±0  0 ❌ ±0 

Results for commit b6704e9. ± Comparison against base commit b301df3.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses version conflicts when upgrading FluentMigrator to 7.2.0 in applications targeting .NET 8.0 by introducing a flexible version range for Microsoft packages and removing redundant MSBuild configuration.

Key Changes:

  • Introduces $(MicrosoftPackageVersion) variable set to [8.0.0,) to allow flexible Microsoft package versions
  • Replaces hardcoded Microsoft package versions across all projects with the new variable
  • Removes redundant PackageReference Update elements for JetBrains.Annotations from individual projects

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Global.props Defines MicrosoftPackageVersion variable, updates JetBrains.Annotations to 2025.2.4, simplifies release notes
src/FluentMigrator/FluentMigrator.csproj Uses variable for Microsoft.Extensions packages, removes redundant JetBrains reference
src/FluentMigrator.Runner/FluentMigrator.Runner.csproj Uses variable for Configuration.Abstractions, removes redundant JetBrains reference
src/FluentMigrator.Runner.Core/FluentMigrator.Runner.Core.csproj Uses variable for all Microsoft.Extensions packages, removes redundant JetBrains reference
src/FluentMigrator.Runner.Firebird/FluentMigrator.Runner.Firebird.csproj Uses variable for Microsoft.Extensions.Options, removes redundant references
src/FluentMigrator.DotNet.Cli/FluentMigrator.DotNet.Cli.csproj Uses variable for Microsoft packages, removes redundant JetBrains reference
src/FluentMigrator.Console/FluentMigrator.Console.csproj Uses variable for Microsoft.Data.Sqlite, removes redundant JetBrains reference
src/FluentMigrator.Runner.SqlServer/FluentMigrator.Runner.SqlServer.csproj Removes empty Folder ItemGroup and redundant JetBrains reference
src/FluentMigrator.Runner.{Db2,Hana,Jet,MySql,Oracle,Postgres,Redshift,Snowflake,SQLite}/FluentMigrator.Runner.*.csproj Removes redundant JetBrains.Annotations references across all database runner projects
src/FluentMigrator.Extensions.{MySql,Oracle,Postgres,Snowflake,SqlServer}/FluentMigrator.Extensions.*.csproj Removes redundant JetBrains.Annotations references across all extension projects
src/FluentMigrator.MSBuild/FluentMigrator.MSBuild.csproj Removes redundant JetBrains.Annotations reference
src/FluentMigrator.Abstractions/FluentMigrator.Abstractions.csproj Removes redundant JetBrains.Annotations reference
samples/FluentMigrator.Example.{Migrator,Migrations,MSBuild,TypeMapper}/FluentMigrator.Example.*.csproj Uses variable for Microsoft packages and removes redundant references across sample projects
samples/FluentMigrator.Example.MSBuild/FluentMigrator.Example.MSBuild.csproj Simplifies MigrationAssembly path logic to dynamically use $(TargetFramework)
test/FluentMigrator.Analyzers.Tests/FluentMigrator.Analyzers.Tests.csproj Updates Microsoft.NET.Test.Sdk from 17.11.1 to 17.14.1
test/FluentMigrator.Tests/FluentMigrator.Tests.csproj Removes redundant JetBrains.Annotations reference

Comment thread src/FluentMigrator.Console/FluentMigrator.Console.csproj Outdated
Comment thread Global.props
</ItemGroup>

<PropertyGroup>
<MicrosoftPackageVersion>[8.0.0,)</MicrosoftPackageVersion>

Copilot AI Jan 2, 2026

Copy link

Choose a reason for hiding this comment

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

The version range syntax "[8.0.0,)" means "8.0.0 or any higher version, including major versions like 9.0, 10.0, etc." While this achieves the goal of fixing version conflicts for consumers using .NET 8.0 packages, it could potentially introduce breaking changes when Microsoft releases future major versions. Consider using a more conservative range like "[8.0.0,10.0.0)" to avoid unexpected breaking changes while still providing flexibility for minor and patch version updates across .NET 8.0 and 9.0.

Suggested change
<MicrosoftPackageVersion>[8.0.0,)</MicrosoftPackageVersion>
<MicrosoftPackageVersion>[8.0.0,10.0.0)</MicrosoftPackageVersion>

Copilot uses AI. Check for mistakes.

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.

@PhenX we can try this but I think the key approach is to build support for creating one's own in process runner.

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.

@PhenX we can try this but I think the key approach is to build support for creating one's own in process runner.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@jzabroski I'm not sure it's needed to specify high limit, if I read this correctly : the lowest matching version will be used

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.

if you create an in-process runner rather than rely on FluentMigrator.Console or DotNet.Cli, yes, that's the point. Whatever version matches the overall constraint of the target will be used .

Comment thread Global.props Outdated

@jzabroski jzabroski 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.

We can try this but:

  • it may confuse dependabot.
  • even Microsoft isn't always consistent with publishing package versions and some like Entity Framework authentication can be Framework version specific

@jzabroski jzabroski added this to the 8.0.0 milestone Jan 2, 2026
@PhenX
PhenX merged commit 857469e into main Jan 2, 2026
3 of 4 checks passed
@jzabroski
jzabroski deleted the feature/improve-version-handling branch July 23, 2026 22:35
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