
Description
thread-abort-migration is an agent skill that moves .NET Framework code off Thread.Abort. Thread.Abort throws PlatformNotSupportedException in modern .NET, and there is no way to forcibly stop a managed thread there, so code that relies on it has to switch to cooperative cancellation. The skill first identifies which usage pattern the code has, then applies the matching replacement. It covers ThreadAbortException catch blocks that use control flow or cleanup, Thread.ResetAbort calls, Thread.Interrupt used to wake blocked threads, and ASP.NET code where Response.End or Response.Redirect with the end-response flag calls Thread.Abort internally. It also helps with PlatformNotSupportedException and SYSLIB0006 warnings that appear after a target framework change.…
Highlights
- Replaces Thread.Abort with cooperative cancellation
- Handles ThreadAbortException catch blocks and ResetAbort calls
- Fixes ASP.NET Response.End and Redirect aborts
- Clears PlatformNotSupportedException and SYSLIB0006 warnings
Ratings & Reviews
No ratings yet
Be the first to rate thread-abort-migration.
People also visit
thread-abort-migration FAQ
Why do I need to migrate?
Thread.Abort throws PlatformNotSupportedException in .NET 6 and later, so code that calls it has to move to cooperative cancellation.
Does it cover ASP.NET?
Yes. It covers ASP.NET code that uses Response.End or Response.Redirect with the end-response flag, which call Thread.Abort internally.
Will it change code that does not need it?
No. If the code only uses Thread.Join, Thread.Sleep or Thread.Start, the skill says no migration is required.
How do I install it?
Run npx skills add https://github.com/dotnet/skills --skill thread-abort-migration in a terminal.
Which security audits has it passed?
Gen Agent Trust Hub Pass, Socket Pass, Snyk Pass.
What are the best thread-abort-migration alternatives?
Popular alternatives to thread-abort-migration include migrate-dotnet10-to-dotnet11, migrate-dotnet8-to-dotnet9 and migrate-dotnet9-to-dotnet10. See all thread-abort-migration alternatives






