MSIX Appears to Not Include System.Text.Encodings.Web

Copper Contributor

I posted about this over at WinUI 3 App Runs on Development Machine, Crashes Elsewhere - Microsoft Q&A before stumbling across this forum.

 

I won't repeat all of what I wrote over there. Bottom-line, it looks like when the MSIX was created it failed to include System.Text.Encodings.Web.dll. At least, the app crashes on a test machine (not my development machine) and, under WinDbg, it appears like the culprit is that dll.

 

Is there a way to examine what's in an MSIX file? How do I get the missing file, assuming it is missing, to be included in the package? If that's not the problem how else do I go about debugging this?

3 Replies
If you just want to look, it's basically a zip file so rename a copy and open. It will break that copy so you can't change it there. To do that you'd have to use a tool that will rebuild the package. The Microsoft MSIX Packaging Tool (free, in Microsoft Store) has a crude editor, but there are many (not free) third party vendors that offer MSI/Setup builders have support, as does TMEditX.

But first, check that you set the capabilities in your package. If you are including that, you are likely calling out to the internet and need to declare the "client internet" capability, or your code will/may fail on non-development systems.

Thanx for the reply. After posting this I learned about the Packaging Tool and was able to confirm the DLL was included in the MSIX. Turns out the problem had to do with an exception being thrown within an exception handler I'd written for my logging subsystem. Apparently that was deep enough that it just blew away the app when it occurred, leaving a trail of "off topic" and unhelpful messages (like System.Text.Encodings.Web being missing).

Glad that you got to the bottom of that. We ALL want to see more MSIX packages out there!