Click here to Skip to main content
16,022,205 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Quote:

MauiArcGISApp2.exe
CoreCLR Version: 8.0.724.31311
.NET Version: 8.0.7
Description: The process was terminated due to an unhandled exception.
Exception Info: 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\admin\.nuget\packages\microsoft.windowsappsdk\1.5.240311000\include\DeploymentManagerAutoInitializer.cs:line 44
at Microsoft.Windows.ApplicationModel.WindowsAppRuntime.DeploymentManagerCS.AutoInitialize.AccessWindowsAppSDK() in C:\Users\admin\.nuget\packages\microsoft.windowsappsdk\1.5.240311000\include\DeploymentManagerAutoInitializer.cs:line 30
at .cctor()
--- End of inner exception stack trace ---


What I have tried:

I tried Microsoft forums and checked in Google but it is giving this exception upon trying to run the app. I am using .NET version 8.0 and Framework version of 4.0.
Posted
Updated 10-Jul-24 23:13pm
v2
Comments
[no name] 11-Jul-24 3:58am    
The error is caused by the COM class not beig present on the system where you are running the code. So examine your code to see which class or framework you need to install.
Richard Deeming 11-Jul-24 5:14am    
"I am using .NET version 8.0 and Framework version of 4.0"

Well, that makes no sense for a start. You are either using .NET Framework 4.x, or .NET 8.0; you cannot use both in the same application!
AKASHPRAN NATH 11-Jul-24 6:10am    
we placed our exe file in visual studio and started debugging. The environment that i am working is in G drive and dotnet is installed in C drive.

Here are the errors we got.

'MauiArcGISApp2.exe' (Win32): Loaded 'G:\Akash\MauiArcGISApp2\bin\Release\net8.0-windows10.0.19041.0\win10-x64\MauiArcGISApp2.exe'. Symbol loading disabled by Include/Exclude setting.
'MauiArcGISApp2.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Symbol loading disabled by Include/Exclude setting.
'MauiArcGISApp2.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Symbol loading disabled by Include/Exclude setting.
'MauiArcGISApp2.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Symbol loading disabled by Include/Exclude setting.
'MauiArcGISApp2.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Symbol loading disabled by Include/Exclude setting.
'MauiArcGISApp2.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. Symbol loading disabled by Include/Exclude setting.
'MauiArcGISApp2.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Symbol loading disabled by Include/Exclude setting.
'MauiArcGISApp2.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'. Symbol loading disabled by Include/Exclude setting.
Richard Deeming 11-Jul-24 6:22am    
Those are not errors; those are just messages.

My comment still stands: you cannot use both .NET Framework 4.x and .NET 8.0 in the same application.
Dave Kreskowiak 11-Jul-24 10:03am    
Once again, this is just more proof you don't know what you're talking about. On which drive, the .NET Framework or .NET is installed does not matter in the slightest.

The error message is quite clear if you read it. There is a COM class you're code is trying to create an instance of and that class is not installed or registered on your machine.

Since nobody knows anything at all about your code, except you, nobody can tell you which COM component is missing on the machines you're trying to run the code on.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900