I have an application which runs on Win7 but not on WinXp (yes we still have some of those)
The reason is the dll : wiaaut.dll
Registering
that dll
using regsvr32
works. But the preferred method is by code (less manual labor)
So we thought to load & register the assembly on load()
using the following code:
Dim asm As Assembly = Assembly.LoadFrom(System.Environment.CurrentDirectory & "\WIA\wiaaut.dll")
Dim regAsm As RegistrationServices = New RegistrationServices()
Dim bResult = regAsm.RegisterAssembly(asm, AssemblyRegistrationFlags.SetCodeBase)
yet on first line i get the error: The module was expeted to contain assembly manifest
I tried solving it with other similar questions here:
SO Question 1 Not really the same problem
- Target Framework of my application is 4.0 (so no problems there)
- Changed my target configuration to x86 (still problems) , or any other configuration for that matter
SO Question 3 No actual solution offred
SO QUestion 4 No answers presnt
... And many many more ...
So to all you brianiacs over there, here is my question:
- How can i avoid the exception so that the code works.
- Or is there any other method to register a dll on the current machine (using code)