How to fix SystemLoadExecption

Nat323 20 Reputation points
2024-07-23T23:13:08.8466667+00:00

Exception has occurred: CLR/System.TypeLoadException

  • An unhandled exception of type 'System.TypeLoadException' occurred in Winappli.dll: 'Could not load type 'Microsoft.Toolkit.Uwp.Notifications.NotificationActivator' from assembly 'Microsoft.Toolkit.Uwp.Notifications, Version=7.1.0.0, Culture=neutral, PublicKeyToken=4aff67a105548ee2'.'
Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,894 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,963 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,731 questions
{count} votes

Accepted answer
  1. Jiachen Li-MSFT 31,801 Reputation points Microsoft Vendor
    2024-07-24T01:22:07.6466667+00:00

    Hi @Nat323 ,

    A System.TypeLoadException generally occurs when the runtime cannot find the type you're trying to use. In this case, it seems like there's an issue loading NotificationActivator from the Microsoft.Toolkit.Uwp.Notifications assembly.

    Verify that the Microsoft.Toolkit.Uwp.Notifications assembly is correctly referenced in your project. Check the properties of the reference in your project to ensure it points to the correct path.

    Make sure the version of the Microsoft.Toolkit.Uwp.Notifications assembly referenced in your project matches the version specified in your code. If you're targeting version 7.1.0.0, ensure that this is the version installed via NuGet.

    Try reinstalling or updating the NuGet package.

    Best Regards.

    Jiachen Li


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.