I really hope someone can help me with this as its been driving me insane for about 3 days now.
I've written an application that uses a COM dll belonging to some software I've installed to run a 'publication'.
Up until about 5 days ago this was working fine but now every time I try to debug or run a built version I get the following error:
An unhandled exception of type 'System.IO.FileLoadException' occurred in Publish.exe
Additional information: A dynamic link library (DLL) initialization routine failed.
The DLL that's failing to initialise appears to be HDPublishing.dll as it's failing on the second line of the below.
hdPub1 = new HDPUBLISHINGLib.HDIBuilderClass();
Its running under an admin user.
The DLL is an extra one belonging to the software & had to be registered manually & that seems to have worked but it's just not being picked up.
Its included it in the references of the project and I've tried removing it, deleting the .dll from the project folders & then adding the reference again.
This is an application I've been creating in C# based on a VB6 version of it & the compiled VB6 version has also ceased working.
I've tried uninstalling & reinstalling the software & dll numerous times & been through the registry in case there were any stray entries but nothing looks amiss (although I don't know that much about the registry).
The extra dll thats causing the problems isn't listed in the DCOM config but the piece of software its for is & I've given Everyone full rights on it & it hasn't made any difference.
I've also tried giving the local machine & intranet full trust in the .net configuration.
I think the problem may have started when I was working on another project & added a reference to an application that was running on another machine, a newer version of the software my publishing is based on but the reference wasn't for the same library.
Can anyone suggest anything I could try because I'm getting to the point now where I'm sorely tempted to just reformat the machine?