Skip to content

Migrate Paket builds to NuGet CPM - #314

Draft
sergey-tihon wants to merge 1 commit into
masterfrom
feature/no-paket
Draft

sergey-tihon wants to merge 1 commit into
masterfrom
feature/no-paket

Conversation

@sergey-tihon

Copy link
Copy Markdown
Member

Summary

  • Replace Paket dependency files and per-project references with NuGet Central Package Management.
  • Replace Paket packaging with dotnet pack; publish the three library packages and matching .snupkg symbol packages.
  • Remove obsolete sample packages/templates, CopyBinaries, and the legacy install.ps1 binding-redirect script.
  • Update docs to load assemblies from test build outputs; handle release notes through the environment so commas and semicolons do not break MSBuild arguments.
  • Pin Fake dependencies to 6.1.4, remove the duplicated package version, and add Trusted Publishing checks/artifact upload for symbols.
  • Target the xUnit and MSTest libraries at net8.0 only; NUnit was already net8.0 only.

Verification

  • DOTNET_ROLL_FORWARD=Major dotnet run --project build/build.fsproj -- NuGet passed: build plus 338 NUnit, 338 xUnit, and 270 MSTest tests.
  • Verified the target produces three .nupkg and three .snupkg packages; all library assets/dependency groups target net8.0 only.
  • dotnet outdated discovers CPM-managed dependencies.
  • Docs generation produces output/xUnit.html; it still reports pre-existing F# errors in docs/index.fsx:163.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The migration is internally consistent, verified across all test suites, and no unresolved correctness issues were identified.

0 open findings

What changed in this PR

Migrates dependency management and packaging from Paket to NuGet CPM and SDK tooling.

Changes:

  • Centralizes NuGet versions and updates project references.
  • Packages three net8.0 libraries with symbols.
  • Adds Trusted Publishing and removes obsolete Paket assets.
File Description
tests/​FsUnit.Xunit.Test/​paket.references Removes Paket references.
tests/​FsUnit.Xunit.Test/​FsUnit.Xunit.Test.fsproj Adds NuGet test dependencies.
tests/​FsUnit.NUnit.Test/​paket.references Removes Paket references.
tests/​FsUnit.NUnit.Test/​FsUnit.NUnit.Test.fsproj Adds NuGet test dependencies.
tests/​FsUnit.MsTest.Test/​paket.references Removes Paket references.
tests/​FsUnit.MsTest.Test/​FsUnit.MsTest.Test.fsproj Adds NuGet test dependencies.
src/​install.ps1 Removes legacy binding redirects.
src/​FsUnit.Xunit/​sample.paket.template Removes obsolete sample package.
src/​FsUnit.Xunit/​paket.template Removes Paket packaging metadata.
src/​FsUnit.Xunit/​paket.references Removes Paket references.
src/​FsUnit.Xunit/​FsUnitSample.fs.pp Removes legacy sample content.
src/​FsUnit.Xunit/​FsUnit.Xunit.fsproj Adds SDK packaging and targets net8.0.
src/​FsUnit.NUnit/​sample.paket.template Removes obsolete sample package.
src/​FsUnit.NUnit/​paket.template Removes Paket packaging metadata.
src/​FsUnit.NUnit/​paket.references Removes Paket references.
src/​FsUnit.NUnit/​FsUnitSample.fs.pp Removes legacy sample content.
src/​FsUnit.NUnit/​FsUnit.NUnit.fsproj Adds SDK packaging metadata.
src/​FsUnit.MsTestUnit/​sample.paket.template Removes obsolete sample package.
src/​FsUnit.MsTestUnit/​paket.template Removes Paket packaging metadata.
src/​FsUnit.MsTestUnit/​paket.references Removes Paket references.
src/​FsUnit.MsTestUnit/​FsUnitSample.fs.pp Removes legacy sample content.
src/​FsUnit.MsTestUnit/​FsUnit.MsTest.fsproj Adds SDK packaging and targets net8.0.
README.md Documents CPM and publishing.
paket.lock Removes Paket lock data.
paket.dependencies Removes Paket dependency configuration.
FsUnit.slnx Removes obsolete Paket entries.
docs/​xUnit.fsx Loads xUnit build outputs.
docs/​NUnit.fsx Loads NUnit build outputs.
docs/​MsTest.fsx Loads MSTest build outputs.
docs/​index.fsx Loads NUnit test outputs.
docs/​FsUnitTyped.fsx Loads NUnit test outputs.
Directory.Packages.props Defines central package versions.
Directory.Build.props Defines shared package metadata and symbols.
build/​build.fsproj Excludes build tooling from CPM.
build/​build.fs Replaces Paket packaging with dotnet pack.
build.sh Removes Paket restore.
build.cmd Removes Paket restore.
.gitignore Removes Paket-specific exclusions.
.github/​workflows/​publish.yml Adds Trusted Publishing workflow.
.github/​workflows/​main.yml Removes Paket restore from CI.
.config/​dotnet-tools.json Replaces Paket with dotnet-outdated.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@CaptnCodr CaptnCodr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Updating all frameworks can be smart here when we drop netstandard2.0 and have a major release anyways.

Comment thread Directory.Packages.props
<PackageVersion Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageVersion Include="System.Collections.NonGeneric" Version="4.3.0" />
<PackageVersion Include="NHamcrest" Version="4.0.0" />
<PackageVersion Include="xunit.v3" Version="1.0.0" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is already xunit.v3 4.0.2 on Nuget.

Comment thread Directory.Packages.props
<PackageVersion Include="System.Collections.NonGeneric" Version="4.3.0" />
<PackageVersion Include="NHamcrest" Version="4.0.0" />
<PackageVersion Include="xunit.v3" Version="1.0.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.0" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

xunit.runner.visualstudio 4.0.1 on Nuget.

Comment thread Directory.Packages.props
<PackageVersion Include="xunit.v3" Version="1.0.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.0" />
<PackageVersion Include="MSTest.TestFramework" Version="3.6.4" />
<PackageVersion Include="MSTest.TestAdapter" Version="3.6.4" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

MsTest deps in 4.5.1, too?

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