Skip to content

Modernize MIST for .NET 10 and replace PowerShell install scripts with NuGet build integration#17

Merged
mathtone merged 5 commits into
mainfrom
copilot/update-dotnet-core-support
May 21, 2026
Merged

Modernize MIST for .NET 10 and replace PowerShell install scripts with NuGet build integration#17
mathtone merged 5 commits into
mainfrom
copilot/update-dotnet-core-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 1, 2026

MIST was stuck on the legacy NuGet 2.x install model: a PowerShell Install.ps1 mutated the consumer's .csproj to register the IL-weaving build task, and target frameworks stopped at net8.0. This change extends framework coverage through .NET 10 and moves integration to the modern build/ + buildTransitive/ props/targets convention so a plain <PackageReference> is enough.

Target frameworks

  • Mathtone.MIST (attribute library): netstandard2.0;net472;net6.0;net8.0;net9.0;net10.0.
  • Mathtone.MIST.Builder (task assembly): multi-targeted net472 (full-framework MSBuild) + net8.0 (.NET SDK); selected at build time via $(MSBuildRuntimeType).

NuGet integration (replaces the PowerShell scripts)

  • New build/Mathtone.MIST.Builder.props + .targets, auto-imported by NuGet, register <UsingTask> and run NotificationWeaverBuildTask AfterTargets="Build".
  • Task assemblies pack under tasks/<tfm>/ via TargetsForTfmSpecificContentInPackage (per-TFM packing).
  • Existing buildTransitive/ files forward to build/, so transitive references work too.
  • Two opt-in/out MSBuild properties exposed:
<PropertyGroup>
  <MathtoneMistEnabled>true</MathtoneMistEnabled>           <!-- default true -->
  <MathtoneMistDebugMode>$(DebugSymbols)</MathtoneMistDebugMode>
</PropertyGroup>

Consumer install collapses to:

dotnet add package Mathtone.MIST
dotnet add package Mathtone.MIST.Builder

Removals

  • Mathtone.MIST.Builder.Scripts/ (Install.ps1, Uninstall.ps1, .pssproj).
  • Tests/Mathtone.MIST.Tests.NugetScriptTest/ — its sole purpose was validating the PS install path.
  • Leftover Mathtone.MIST.Builder.csproj.old.
  • Corresponding entries in Mathtone.MIST.sln.

Incidental fixes

  • NotificationWeaver.FindPdbPathFor returned a bare filename with no directory, which broke under dotnet build (where the task's cwd ≠ output dir) and would have blocked the new auto-integration. Now combines the assembly's directory with the pdb name.
  • .gitignore: whitelist Mathtone.MIST.Builder/build/ and buildTransitive/ (the catch-all build/ rule was hiding the new package files); ignore .nuget/ bootstrapped by net472 restore.
  • README rewritten around the new flow; fixed SuppressNotify typo (was SupressNotify).

Copilot AI and others added 2 commits May 1, 2026 10:23
…stall scripts with NuGet props/targets

Agent-Logs-Url: https://github.com/mathtone/MIST/sessions/ab5d4939-5085-49bc-9512-6130ad9f811e

Co-authored-by: mathtone <7595818+mathtone@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Modernizes MIST’s NuGet consumption model by removing the legacy NuGet 2.x PowerShell install/uninstall scripts and replacing them with build/ + buildTransitive/ MSBuild integration, while expanding target framework support up through .NET 10.

Changes:

  • Extend Mathtone.MIST target frameworks to include net9.0 and net10.0.
  • Add NuGet build/ + buildTransitive/ props/targets integration for Mathtone.MIST.Builder and pack task assemblies under tasks/<tfm>/.
  • Remove script-based installer projects/tests and update docs + .gitignore; fix PDB path resolution in the weaver.

Reviewed changes

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

Show a summary per file
File Description
Tests/Mathtone.MIST.Tests.NugetScriptTest/TestClass.cs Removes legacy NuGet-script validation test harness.
Tests/Mathtone.MIST.Tests.NugetScriptTest/Properties/AssemblyInfo.cs Deletes legacy test project assembly metadata.
Tests/Mathtone.MIST.Tests.NugetScriptTest/packages.config Deletes legacy packages.config used by removed script test.
Tests/Mathtone.MIST.Tests.NugetScriptTest/Mathtone.MIST.Tests.NugetScriptTest.csproj Removes old-style .NET Framework test project that validated Install.ps1 behavior.
Tests/Mathtone.MIST.Tests.NugetScriptTest/Mathtone.MIST.Tests.NotifierBase/Properties/AssemblyInfo.cs Removes legacy nested test-project assembly metadata.
Tests/Mathtone.MIST.Tests.NugetScriptTest/Mathtone.MIST.Tests.NotifierBase/NotifierBase.cs Deletes legacy test notifier base used only by removed script test project.
Tests/Mathtone.MIST.Tests.NugetScriptTest/Mathtone.MIST.Tests.NotifierBase/Mathtone.MIST.Tests.NotifierBase.csproj Removes nested legacy test project.
Tests/Mathtone.MIST.Tests.NugetScriptTest/app.config Deletes config for removed script test project.
README.md Updates installation/usage documentation to the new PackageReference + build integration flow.
Mathtone.MIST/Mathtone.MIST.csproj Adds net9.0 and net10.0 to supported TFMs for the attribute library.
Mathtone.MIST.sln Removes the legacy scripts project + removed test project from the solution.
Mathtone.MIST.Builder/NotificationWeaver.cs Fixes PDB path computation to be directory-aware.
Mathtone.MIST.Builder/Mathtone.MIST.Builder.csproj.old Deletes obsolete project file.
Mathtone.MIST.Builder/Mathtone.MIST.Builder.csproj Retargets/repacks builder into modern NuGet build integration + per-TFM task payload in tasks/.
Mathtone.MIST.Builder/build/Mathtone.MIST.Builder.props New props: selects task-assembly flavor and exposes opt-in/out properties.
Mathtone.MIST.Builder/build/Mathtone.MIST.Builder.targets New targets: registers and runs the weaving MSBuild task automatically.
Mathtone.MIST.Builder/buildTransitive/Mathtone.MIST.Builder.props New forwarding props for transitive package references.
Mathtone.MIST.Builder/buildTransitive/Mathtone.MIST.Builder.targets New forwarding targets for transitive package references.
Mathtone.MIST.Builder.Scripts/Uninstall.ps1 Removes legacy NuGet 2.x uninstall script.
Mathtone.MIST.Builder.Scripts/Mathtone.MIST.Builder.Scripts.pssproj Removes legacy scripts project.
Mathtone.MIST.Builder.Scripts/Install.ps1 Removes legacy NuGet 2.x install script.
.gitignore Un-ignores package build/ assets under the builder project and ignores restored .nuget/ artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Mathtone.MIST.Builder/build/Mathtone.MIST.Builder.props Outdated
Comment thread Mathtone.MIST.Builder/Mathtone.MIST.Builder.csproj
Comment thread Mathtone.MIST.Builder/NotificationWeaver.cs
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/mathtone/MIST/sessions/7f93e584-91cb-41be-b25a-1b77b25a3a6e

Co-authored-by: mathtone <7595818+mathtone@users.noreply.github.com>
Copilot AI requested a review from mathtone May 21, 2026 21:41
@mathtone mathtone marked this pull request as ready for review May 21, 2026 21:43
@mathtone mathtone merged commit dd4e107 into main May 21, 2026
1 check failed
@mathtone mathtone deleted the copilot/update-dotnet-core-support branch May 21, 2026 21:48
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

<Import Project="..\build\Mathtone.MIST.Builder.targets" />

P2 Badge Guard transitive import to avoid duplicate MSBuild imports

This buildTransitive file unconditionally imports the same build targets that are already imported for direct PackageReference consumers, so direct installs will hit duplicate-import warnings (MSB4011) on every build. In environments that elevate MSBuild warnings (for example with warnAsError policies), this can fail builds even though the package is installed correctly. Add an import guard condition (or avoid re-importing build from buildTransitive) so the file is only brought in once.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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