I have created a setup in windows application using C#. In the Installer class I have overridden the Uninstall method as I wanted to perform some custom actions. But, while uninstallation I am getting error as
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Can anyone help as I am not getting how to sort it out.

Recommended Answers

All 3 Replies

Victoryy , i don't know what custom action you want to perform in overridden uninstall method. I guess you may be saving some user settings or data on a file before uninstall. In doing so, you are making mistake when reading information to be saved in given file.
Its hard to give specific solution without seeing code.

In uninstallation method I am performing 2 tasks
1. Updating values in database.
2. Deleting values from system registery.

If I will exclude these custom actions then error is not showing. But, If I include it, it is showing error.

I would write some debug code that allows you to see the exception details. Trying to guess the problem with no code and no specific error will be nigh on impossible.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.