Skip to content

Cannot Start Maui Tutorial on Windows #130

@markgr

Description

@markgr

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

If I try it from a command line

Unhandled exception. System.TypeInitializationException: The type initializer for '<Module>' 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions