Modernize MIST for .NET 10 and replace PowerShell install scripts with NuGet build integration#17
Conversation
…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>
Agent-Logs-Url: https://github.com/mathtone/MIST/sessions/ab5d4939-5085-49bc-9512-6130ad9f811e Co-authored-by: mathtone <7595818+mathtone@users.noreply.github.com>
There was a problem hiding this comment.
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.MISTtarget frameworks to includenet9.0andnet10.0. - Add NuGet
build/+buildTransitive/props/targets integration forMathtone.MIST.Builderand pack task assemblies undertasks/<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.
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>
Agent-Logs-Url: https://github.com/mathtone/MIST/sessions/f6c4a3a1-ca8a-4179-ac12-ed05b544dfa2 Co-authored-by: mathtone <7595818+mathtone@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
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".
MIST was stuck on the legacy NuGet 2.x install model: a PowerShell
Install.ps1mutated the consumer's.csprojto register the IL-weaving build task, and target frameworks stopped atnet8.0. This change extends framework coverage through .NET 10 and moves integration to the modernbuild/+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-targetednet472(full-framework MSBuild) +net8.0(.NET SDK); selected at build time via$(MSBuildRuntimeType).NuGet integration (replaces the PowerShell scripts)
build/Mathtone.MIST.Builder.props+.targets, auto-imported by NuGet, register<UsingTask>and runNotificationWeaverBuildTaskAfterTargets="Build".tasks/<tfm>/viaTargetsForTfmSpecificContentInPackage(per-TFM packing).buildTransitive/files forward tobuild/, so transitive references work too.Consumer install collapses to:
Removals
Mathtone.MIST.Builder.Scripts/(Install.ps1,Uninstall.ps1,.pssproj).Tests/Mathtone.MIST.Tests.NugetScriptTest/— its sole purpose was validating the PS install path.Mathtone.MIST.Builder.csproj.old.Mathtone.MIST.sln.Incidental fixes
NotificationWeaver.FindPdbPathForreturned a bare filename with no directory, which broke underdotnet 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: whitelistMathtone.MIST.Builder/build/andbuildTransitive/(the catch-allbuild/rule was hiding the new package files); ignore.nuget/bootstrapped by net472 restore.SuppressNotifytypo (wasSupressNotify).