************** Exception Text **************< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
System.IO.FileLoadException: Could not load file or assembly 'HDRLib, Version=1.0.2144.16487, Culture=neutral, PublicKeyToken=null' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)
File name: 'HDRLib, Version=1.0.2144.16487, Culture=neutral, PublicKeyToken=null' ---> System.Runtime.InteropServices.COMException (0x800736B1): This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)
This error occurs when he clicks the menu item which calls the function that uses the dll, so I assume it gets loaded as it gets used. I did some research and realised this was telling me that I needed to put the MFC and CRT dlls in my redistributable. I don't know why, as I don't use either, but I have a dim memory of having to create my own manifest file, perhaps the manifest is claiming to use these two in error. Anyhow, I run W2000 on a VM, and so I updated it to SP3, .NET 2.0, and got the same error. Then I went to the x86 directories in Windows/WinSxS and copied across a total of 7 dlls. The app now runs in my W2000 VM. If I send those dlls to my boss ( using a tablet PC, XP tablet edition ), it does not work, same error. I assume he has an x86 processor. What else could be the problem here
I've spent the evening trying to work this out ( I need to deliver this tomorrow ). Running it on my XP Home notebook fails, although my W2000 Virtual machine with no dev tools ran it fine. I also noticed that the manifest asks for a different version of MFC to the one I have installed ( the one frorm the beta, perhaps ) I rebuilt the dll again, it's not changed what it asks for. I found the manifest details in the manifest folder and changed it. Nothing works. I've asked about this quite a few times now, but I'm asking one last time because without a solution, I cannot deliver on time. I've googled and only found other people who have asked the same thing here and got no reply, or who suggested copying the dlls ( which I have done to no avail ). Any help at all will be most appreciated.

C++/CLI dll will not load in C# project (repost, with more info )
Gurumeet_WebTech_India
Solved my problem as well with this post.
Only thing I had to do was make sure the C++ project was compiled as Release instead of Debug. Error went away on client computer.
Flip
It also looks like VS2005 SP1 changed the version of the runtime libraries from 8.0.50727.42 to 8.0.50727.762, meaning that DLLs linked with the service pack will need a new runtime library installed.
--Eric
Colon CrapSpray
Any idea why this would only work in debug mode
I have tried every solution to the FileLoadException problem possible, packaging as shared assemblies, as private assemblies, followed every document on deployment, and nothing will work except shared SxS assemblies in Debug mode (which I cannot redistribute).
Any help is greatly appreciated.
-Shane
Steve Boyd
The good news it that you can find the updated redistributable installation package in 'C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages' and the new runtime can be installed side-by-side with any previous version.
---------
/Enrico
robinsenior
In the past, I use VS2005 and compile it and use in the ASPX is OK. But now, I compile with use CL.EXE but when I use in the application or website, it said that "The specified module could not be found. (Exception from HRESULT: 0x8007007E)".
I have run 'C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86\vcredist_x86.exe' aldready. This is content of my DLL manifest. (mylib.dll.manifest)
< xml version='1.0' encoding='UTF-8' standalone='yes' >
<assembly xmlns='urn
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
</assembly>
Please help me. Thanks in advanced.
TranThanh
rcarun
I will do a /verbose compile to see, because this is a C++/CLI port of code that definately did not use MFC. That's a shame about CRT, I thought if I avoided stuff like C string handling, I would avoid that dependancy.
kidrupe
There are two different merge modules. One with Debug, another one with Release version of CRT. When deploying release version of your program, are you using merge module with Release version of CRT Also try using depends.exe after you deployed release version of your application to another computer to check if all dependencies are installed. Perhaps the problem is not related to the CRT dll at all.
You may also contact Developer Support team, support.microsoft.com, to get more detailed help for your project.
Nikola
Efraim Kyriakidis
Hi
I had the same problem until today (Exception from HRESULT: 0x800736B1).
In my develop. box everything worked fine, but in the test machine that errors appears when a C# app called a DLL compiled with MSVC++2005.
After reading the msdn documentation, this forum and other helpfull sites, I managed to fix it. Maybe this could help someone in the same situation.
1) Install vcredist_x86.exe in the customer/test/deployment machine. It can be found on \Program Files\Microsoft Visual Studio8\Sdk\v2.0BootStrapper\Packages\vcredist_x86
2) Make sure you are using the dll’s RELEASE version. For some reason the dll’s DEBUG version keep getting the same error. (Maybe the MSVC++ 2005 redist does not install the DEBUG required files such as Microsoft.VC80.DebugCRT, didn’t check this, just a thought).
With these two steps I’ve done it. Also you can check if your DLL has the Manifest embedded. Look inside the DLL with a bin editor/reader and look for the xml file with manifestVersion string. If the manifest is not embedded, check for the file in your output dir, something like yourdll.manifest and use the mt.exe tool from the bin dir of vc to include it inside the dll.
Hope this helps someone, cheers.
Romran
Speedo
You first need to understand dependencies of your DLL. It can be both VC++ DLLs and other Dlls of yours. If these are VC++ DLLs, a dependency on any of them is specified in the manifest. Could you post your manifest to this topic Is it embedded inside DLL or stored as an external file Have you followed steps desribed in http://msdn2.microsoft.com/en-us/library/ms235342(en-US,VS.80).aspx Do not manually edit manifest in either your DLL or in WinSxS.
When you build your app, you may use /verbose switch of the linker (http://msdn2.microsoft.com/en-us/library/wdsk6as6.aspx) and this should give you an idea why MFC is pulled in. You cannot avoid dependency on CRT because it contains initialization code.
Nikola
VC++
Alejandro Rodriguez
In my case, having installed vcredist_x86 solved the problem.
Thanks
kharulli
C:\Program Files\Common Files\Merge Modules\Microsoft_VC80_CRT_x86.msm
C:\Program Files\Common Files\Merge Modules\policy_8_0_Microsoft_VC80_CRT_x86.msm
aboreham
In my case, in order to get my project to work on a deployment machine (it worked fine on my development machine), I had to make sure that :
depends.exe (default location : C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin) really helped in determining the dependencies of DLLs that failed to load on the deployment machine.
ianoble
Thanks,
Ayman Shoukry
VC++ Team