CommunityToolkit / CommunityToolkit/MVVM-Samples

Cannot Start Maui Tutorial on Windows

Open
#130 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
1.4k
Forks
265
PR merge metrics
No merged PRs in 30d

Description

Ok so this is really weird

So Env: - Visual Studio 17.8.3
Dotnet SDKS: 8.0.100
All workloads up to date

I download the whole Git repo - I then open the DotNet MAUI tutorial project maui-samples\8.0\Tutorials\CreateNetMauiApp - Step 1

Build for windows - I get the following exception

![image](https://github.com/CommunityToolkit/MVVM-Samples/assets/2209069/3af2d9f4-7a62-41f1-8738-ead96f88d2e6)

If I try it from a command line

```
Unhandled exception. System.TypeInitializationException: The type initializer for '' threw an exception.
---> System.TypeInitializationException: The type initializer for 'WinRT.ActivationFactory`1' threw an exception.
---> System.Runtime.InteropServices.COMException (0x80040154): Class not registered (0x80040154 (REGDB_E_CLASSNOTREG))
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at WinRT.BaseActivationFactory..ctor(String typeNamespace, String typeFullName)
at WinRT.ActivationFactory`1..ctor()
at WinRT.ActivationFactory`1..cctor()
--- End of inner exception stack trace ---
at WinRT.ActivationFactory`1.ActivateInstance[I]()
at Microsoft.Windows.ApplicationModel.WindowsAppRuntime.DeploymentInitializeOptions..ctor()
at Microsoft.Windows.ApplicationModel.WindowsAppRuntime.DeploymentManagerCS.AutoInitialize.get_Options() in C:\Users\saa\.nuget\packages\microsoft.windowsappsdk\1.3.230724000\include\DeploymentManagerAutoInitializer.cs:line 44
at Microsoft.Windows.ApplicationModel.WindowsAppRuntime.DeploymentManagerCS.AutoInitialize.AccessWindowsAppSDK() in C:\Users\saa\.nuget\packages\microsoft.windowsappsdk\1.3.230724000\include\DeploymentManagerAutoInitializer.cs:line 30
at .cctor()
--- End of inner exception stack trace ---
```

However - if I create a brand new MAUI project in VS and attempt to run it on Windows - it works just fine.....

Any ideas of what to look for?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.