Blazor Tips: “Your mono runtime and class libraries are out of sync”

Robert McLaws
CloudNimble
Published in
1 min readOct 3, 2019

We’re getting ready to ship the first version of our reference application for Electron-based Blazor apps, and in the process of upgrading to the .NET Core 3.0 final bits, I ran into a problem that detoured me for the better part of an hour. Since there is no other content on the web about this issue, and it seems like it will end up being fairly common, I thought I’d whip up a quick blog post. So let’s dive right in.

After upgrading, my app stopped loading. So I opened up the Electron Developer Tools, and above the unusually-undecipherable exception was a multi-line warning that started with “WASM: Your mono runtime and class libraries are out of sync.” (Unfortunately, I didn’t take a screenshot when this happened, and I already fixed the issue, so I can’t share one here… sorry.)

Cutting to the Chase

The reason this happens is because the build process for ElectronNET is enormously complex, and because it uses NodeJS + LOTS of Node packages, there will be at least 400MB worth of assets in your bin and obj folders.

When you upgrade between different versions of Blazor, or different versions of Electron, it is best to delete the bin and obj folders from each project in your solution and do a clean build. If you’re on a build server, you should be cleaning your sources directory with every build.

--

--

Robert McLaws
CloudNimble

Founder & CEO of BurnRate (@BurnRate_io). Serial entrepreneur. Former Microsoft MVP. @dotnetfdn member. Helping founders build amazing businesses.