@Kateryna Novak The System.TypeInitializationException
you’re encountering is typically thrown when a static constructor throws an exception, or when some static field initializer does. In your case, it seems to be related to the WinRT.ActivationFactory1
class.
This issue might be due to the following reasons:
- The class you’re trying to instantiate is not registered. This is indicated by the
System.Runtime.InteropServices.COMException (0x80040154): Class not registered (0x80040154 (REGDB_E_CLASSNOTREG))
error. - There might be some access denied issues as mentioned in a similar issue on GitHub.
Here are a few suggestions that might help you resolve this issue:
- Ensure that all the necessary dependencies and packages are correctly installed and up-to-date.
- Try reinstalling the problematic packages or workloads.
- You might also want to try cleaning up Temp folders.