Monday, 7 March 2011

Unable to load one or more of the requested types - Don't blame Open Access

I've just been writing a new small windows service project using VS2010, .NET 4.0 and Telerik Open Access.

I first created my shell for the Windows Service that contained a timer ready to start running the required functionality. I had created the setup and deployment project and it would install fine to the services list and write event log entries as required on the timer_elapsed event. All good so far.
I then added my Open Access rlinq diagram with a couple of tables from a MySql database. All fine too, right up to the point where I went to install the service.
This time I recieved the dreaded "unable to load one or more of the requested types" error message during the install.

I ensured that all of the required assemblies were being copied (though shouldn't have been needed as this error was generated on my development machine where the assemblies are in the GAC).

After a frustrating hour it turned out that Visual Studio didn't refresh the dependant files. It looked like they were at first. I had followed other suggestions about deleting the obj and bin folders, but simply deleting and re-adding the set up project did the trick.

No comments:

Post a Comment