[UWP] Could not find or load a specific file. (Exception from HRESULT: 0x80131621)

Muzib 21 Reputation points
2021-08-15T05:10:48.497+00:00

My UWP app is throwing exception and crashing on start up giving the following error in the file XamlTypeInfo.g.cs

System.IO.FileLoadException: 'Could not find or load a specific file. (Exception from HRESULT: 0x80131621)'

The error is in the following method:

public global::Windows.UI.Xaml.Markup.IXamlType GetXamlTypeByName(string typeName)
{
    return Provider.GetXamlType(typeName);
}

The value of the typeName is this: "Microsoft.UI.Xaml.Controls.StylesVersion"

How can I solve this?

Developer technologies | Universal Windows Platform (UWP)
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.