microsoft / microsoft/WindowsAppSDK
ClassFactory cannot supply requested class .NET MAUI
@Scottj1s is already working on this.
Since Dec 8, 2025.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 471
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 28
Description
### Describe the bug
Similar to #3905, I am getting the following error on startup when I run a self-contained single file executable .NET MAUI application
Per the closed issue, I have tried adding `true` to the csproj of the file. Here is the dotnet publish command I run that succeeds without failure
```
dotnet publish -c Release -f net10.0-windows10.0.19041.0 -p:RuntimeIdentifierOverride=win10-x64 /p:SelfContained=true /p:PublishTrimmed=false /p:PublishSingleFile=true /p:IncludeAllContentForSelfExtract=true
```
The publish directory has a single exe and a pdb file, and running it generates the above error in Event Logs.
I want to call out that this worked a few days ago, so not sure if there was a Windows Update or update to the Windows SDK that would cause this issue. I have made no changes to the application in that time frame that would warrant this occurring.
I am also able to repro with a new .NET MAUI project with just the above node added to the csproj. What can I do to get past this error?
### Steps to reproduce the bug
1. Create new .NET MAUI application
2. Add true to csproj
3. run `dotnet publish -c Release -f net10.0-windows10.0.19041.0 -p:RuntimeIdentifierOverride=win10-x64 /p:SelfContained=true /p:PublishTrimmed=false /p:PublishSingleFile=true /p:IncludeAllContentForSelfExtract=true`
### Expected behavior
Single file exe runs without issue
### Screenshots
_No response_
### NuGet package version
None
### Packaging type
Unpackaged
### Windows version
Insider Build (xxxxx)
### IDE
Other
### Additional context
Here is an output of my installed runtimes
```
Get-AppxPackage *Microsoft.WindowsAppRuntime*
Name : Microsoft.WindowsAppRuntime.1.4
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X86
ResourceId :
Version : 4000.1309.2056.0
PackageFullName : Microsoft.WindowsAppRuntime.1.4_4000.1309.2056.0_x86__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.4_4000.1309.2056.0_x86__8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.1.4_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
Name : Microsoft.WindowsAppRuntime.1.4
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X64
ResourceId :
Version : 4000.1309.2056.0
PackageFullName : Microsoft.WindowsAppRuntime.1.4_4000.1309.2056.0_x64__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.4_4000.1309.2056.0_x64__8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.1.4_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
Name : Microsoft.WindowsAppRuntime.1.2
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X64
ResourceId :
Version : 2000.802.31.0
PackageFullName : Microsoft.WindowsAppRuntime.1.2_2000.802.31.0_x64__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.2_2000.802.31.0_x64__8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.1.2_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
Name : Microsoft.WindowsAppRuntime.1.2
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X86
ResourceId :
Version : 2000.802.31.0
PackageFullName : Microsoft.WindowsAppRuntime.1.2_2000.802.31.0_x86__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.2_2000.802.31.0_x86__8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.1.2_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
Name : Microsoft.WindowsAppRuntime.1.5
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X64
ResourceId :
Version : 5001.373.1736.0
PackageFullName : Microsoft.WindowsAppRuntime.1.5_5001.373.1736.0_x64__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.5_5001.373.1736.0_x64__8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.1.5_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
Name : Microsoft.WindowsAppRuntime.1.5
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X86
ResourceId :
Version : 5001.373.1736.0
PackageFullName : Microsoft.WindowsAppRuntime.1.5_5001.373.1736.0_x86__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.5_5001.373.1736.0_x86__8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.1.5_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
Name : Microsoft.WindowsAppRuntime.1.6
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X64
ResourceId :
Version : 6000.519.329.0
PackageFullName : Microsoft.WindowsAppRuntime.1.6_6000.519.329.0_x64__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.519.329.0_x64__8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.1.6_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
Name : Microsoft.WindowsAppRuntime.1.6
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X86
ResourceId :
Version : 6000.519.329.0
PackageFullName : Microsoft.WindowsAppRuntime.1.6_6000.519.329.0_x86__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.519.329.0_x86__8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.1.6_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
Name : Microsoft.WindowsAppRuntime.1.8
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X64
ResourceId :
Version : 8000.642.119.0
PackageFullName : Microsoft.WindowsAppRuntime.1.8_8000.642.119.0_x64__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.8_8000.642.119.0_x64__8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.1.8_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
Name : Microsoft.WindowsAppRuntime.1.7
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X64
ResourceId :
Version : 7000.652.1806.0
PackageFullName : Microsoft.WindowsAppRuntime.1.7_7000.652.1806.0_x64__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.7_7000.652.1806.0_x64__8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.1.7_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
Name : Microsoft.WindowsAppRuntime.1.8
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X86
ResourceId :
Version : 8000.675.1142.0
PackageFullName : Microsoft.WindowsAppRuntime.1.8_8000.675.1142.0_x86__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.8_8000.675.1142.0_x86__8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.1.8_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
Name : Microsoft.WindowsAppRuntime.1.8
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X64
ResourceId :
Version : 8000.675.1142.0
PackageFullName : Microsoft.WindowsAppRuntime.1.8_8000.675.1142.0_x64__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.8_8000.675.1142.0_x64__8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.1.8_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
Name : Microsoft.WindowsAppRuntime.1.7
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X86
ResourceId :
Version : 7000.676.1651.0
PackageFullName : Microsoft.WindowsAppRuntime.1.7_7000.676.1651.0_x86__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.7_7000.676.1651.0_x86__8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.1.7_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
Name : Microsoft.WindowsAppRuntime.1.7
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X64
ResourceId :
Version : 7000.676.1651.0
PackageFullName : Microsoft.WindowsAppRuntime.1.7_7000.676.1651.0_x64__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.7_7000.676.1651.0_x64__8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.1.7_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok
Name : Microsoft.WindowsAppRuntime.CBS.1.6
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X64
ResourceId :
Version : 6000.668.2201.100
PackageFullName : Microsoft.WindowsAppRuntime.CBS.1.6_6000.668.2201.100_x64__8wekyb3d8bbwe
InstallLocation : C:\Windows\SystemApps\Microsoft.WindowsAppRuntime.CBS_8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.CBS.1.6_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : True
IsPartiallyStaged : False
SignatureKind : System
Status : Ok
Name : Microsoft.WindowsAppRuntime.CBS.1.8
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X64
ResourceId :
Version : 8000.642.119.100
PackageFullName : Microsoft.WindowsAppRuntime.CBS.1.8_8000.642.119.100_x64__8wekyb3d8bbwe
InstallLocation : C:\Windows\SystemApps\Microsoft.WindowsAppRuntime.vNext.CBS_8wekyb3d8bbwe
IsFramework : True
PackageFamilyName : Microsoft.WindowsAppRuntime.CBS.1.8_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : True
IsPartiallyStaged : False
SignatureKind : System
Status : Ok
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.