Skip to content

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

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/update-dotnet-core-support
Draft

Modernize MIST for .NET 10 and replace PowerShell install scripts with NuGet build integration#17
Copilot wants to merge 2 commits intomainfrom
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>
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.

2 participants