microsoft / microsoft/PowerToys

something went wrong while restarting my laptop.

Open
#49,413 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Setup/Install Needs-Author-Feedback Product-PowerToys Run
Dominant language
C
Stars
139k
Forks
8.6k
PR merge metrics
PR metrics pending

Description

### Microsoft PowerToys version

0.98.0.0

### Installation method

GitHub

### Area(s) with issue?

Always on Top

### Steps to reproduce

Version: 0.98.0.0
OS Version: Microsoft Windows NT 10.0.19045.0
IntPtr Length: 8
x64: True
Date: 20-07-2026 11:24:40 AM
Exception:
System.TypeInitializationException: The type initializer for 'Microsoft.PowerToys.Run.Plugin.Calculator.Main' threw an exception.
---> System.IO.FileNotFoundException: Could not load file or assembly 'Mages.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'Mages.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'
at Microsoft.PowerToys.Run.Plugin.Calculator.CalculateEngine..ctor()
at Microsoft.PowerToys.Run.Plugin.Calculator.Main..cctor()
--- End of inner exception stack trace ---
at Microsoft.PowerToys.Run.Plugin.Calculator.Main.get_AdditionalOptions()
at PowerLauncher.SettingsReader.<>c.b__14_0(PluginPair x)
at System.Linq.Enumerable.ListSelectIterator`2.MoveNext()
at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable`1 source, Func`2 keySelector, IEqualityComparer`1 comparer)
at PowerLauncher.SettingsReader.UpdateSettings(PowerLauncherSettings settings)
at PowerLauncher.SettingsReader..ctor(PowerToysRunSettings settings, ThemeManager themeManager)
at PowerLauncher.App.<>c__DisplayClass20_0.b__0()
at Wox.Infrastructure.Stopwatch.Normal(String message, Action action)
at PowerLauncher.App.OnStartup(Object sender, StartupEventArgs e)
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

### ✔️ Expected Behavior

_No response_

### ❌ Actual Behavior

_No response_

### Upload Bug Report ZIP-file

_No response_

### Additional Information

_No response_

### Other Software

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Calculator plugin entry points named in the trace: Microsoft.PowerToys.Run.Plugin.Calculator.Main and CalculateEngine, then follow the startup path through PowerLauncher.SettingsReader. Reproduce the restart failure on PowerToys 0.98.0.0 and inspect whether the Mages.Core dependency is present and loaded. Done means PowerToys Run starts without the TypeInitializationException.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.