Why am I getting System.DllNotFoundException err on win2K3 server?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I'm using vs2005, .net2.0 for a windows application. I call a C++
compile dll and it works fine in Win2K server but I get the follow error
message when I run the same application on a win2k3 server. I use the
Depends tool and found 3 ms lib used by this dll and I have those copied to
my application folder when I install the application on the server but I'm
still getting the error. Does anyone know how I can address this problem?
Thanks.
 
Pucca said:
Hi, I'm using vs2005, .net2.0 for a windows application. I call a C++
compile dll and it works fine in Win2K server but I get the follow error
message when I run the same application on a win2k3 server. I use the
Depends tool and found 3 ms lib used by this dll and I have those copied
to
my application folder when I install the application on the server but I'm
still getting the error. Does anyone know how I can address this problem?
Thanks.


Make sure you distribute the VC run-time libraries.

Willy.
 
My installation copies 3 dll to my applciation folders:
MSVCR80.DLL, MSVCP80.DLL, MSVCRT.DLL

From running "DEPENDS", these are the 3 dlls used. Aren't these the VC
run-time libraries? Thank you.
 
Pucca said:
My installation copies 3 dll to my applciation folders:
MSVCR80.DLL, MSVCP80.DLL, MSVCRT.DLL

From running "DEPENDS", these are the 3 dlls used. Aren't these the VC
run-time libraries? Thank you.

Yes, partly..., however you don't have to copy these, they need to be
installed using VCRedist*.exe. from the bootstrapper folder or from the
download site at:
<http://www.microsoft.com/downloads/...EE-A3F9-4C13-9C99-220B62A191EE&displaylang=en>
<http://www.microsoft.com/downloads/...D9-AE1A-4A14-984D-389C36F85647&displaylang=en>

For more details read the blog at :

<http://blogs.msdn.com/nikolad/>
and:
<http://blogs.msdn.com/astebner/arch...-of-the-vc-8-0-runtime-vcredist-packages.aspx>

Willy.
 
Thank you Willy. I think that solve the lib problem. Now I'm getting error"
"This application has failed to start because the application configuration
is incorrect. Reinstalling the application may fix the problem."
I checked the FileMon and it shows the C application was looking for its
config file (xxx.exe.config). I earched the output directory and there is so
such file. Why is that so? Thank you.
 
Pucca said:
Thank you Willy. I think that solve the lib problem. Now I'm getting
error"
"This application has failed to start because the application
configuration
is incorrect. Reinstalling the application may fix the problem."
I checked the FileMon and it shows the C application was looking for its
config file (xxx.exe.config). I earched the output directory and there is
so
such file. Why is that so? Thank you.

This is not a config issue as you may think, it's definitely a VC deployment
issue, you also need to make sure you are running the same CRT as the one
used for the build.
You can easily solve the issue by statically linking the CRT, or by using a
manifest file.
Read more here:
http://msdn2.microsoft.com/en-us/library/zebw5zk9(VS.80).aspx
and here:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=72965&SiteID=1

Willy.
 
Hi Willy, When I run the vcredist_x86.exe on servers it didn't ask for any
input and ran just fine. I added this exe to my installation project's
CustomAction at "Commit". I run the setup.exe and I got the following
message form VC++ 2005 Redistributable: "Command line option syntax error.".
Do you know what command is it refeering to and do I put this in the
CustomActionData? Thank you.
 
Ok, I think I got it. I need to build a InstallClass for runing the .exe in
CustomActions.
 
Back
Top