Application won't start without Visual Studio

In our project we made a small application which uses dll-files. The problem is that the application won't work in a computer that has not Windows Visual Studio .NET environment installed. The latest version of .NET Framework has been installed on our environments and on the target computer we are testing with.

When starting up the application nothing happens, not one error message. Also, applications made in the same environment without any dll-files work fine in the target computer. Dll-files are located in the same directory that the executable file but the application doesn't seem to find them anyway.

Any idea how to make our application to find dll-files it needs

Thanks,
KK


Answer this question

Application won't start without Visual Studio

  • ciep_base

    Have you tried to install another .NET application that contains .dll to on there machines to see if this problem general or just on your application

    Also is there any errors on Event Viewer

  • fadil1977

    Did that - didn't work. Same result after installation that is,  nothing happens. Dependencies seemed to be alright. More suggestions

  • Jill

    The below posting is for a managed app using managed DLLs if your dlls are older COM components then the rules are different. Also this is a for a regular desktop application not w windows CE Application as the order is a little different.

    It would also help to know how the assemblies are built. Are they strongly named, are they intended to be in the GAC, when you copy the EXE over there are you also copyitng the DLL's and if you are where are you putting them

    .net has a set of rules for finding the dlls this is to eliminate DLL Hell. generally for a deployed application you would want the DLL's in the same directory as the EXE. So are you placing the DLL's in a directory somewhere then putting the EXE on the desktop. If this is the case then put the EXE in the same directory as the DLL is and then put a shortcut to the desktop.

    The CLR Discovers assemblies via probling. So when you launch your application it will search certain directories for the dlls It first will look in the the Application Directory (which is why it is a good idea to put it here first) Then the gloves are off, it will then begin probing for this assembly. It will check in your configuration for the exe if there is a probing path and start looking for it, there are other rules it follows when probling for a dll

    I would very strongly advise not putting DLLs in the GAC unless you are going to have several apps use those DLL's.

    For more information on how .net finds the assembly please refer to this URL
    http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpguide/html/cpconhowruntimelocatesassemblies.asp

  • Dana Hanna

    How are those dlls built Managed or unmanaged
    Where do those dlls reside on the dev machines May those dlls have additional dependecies, i.e. additional dlls which are needed.

    In the Platform SDK there is a tool called Dependency Viewer (depends.exe). It can open executables (dlls and exes) and show which other executables are used or missing. Try this tool on your dev and client machines.

    HTH,
    SvenC

  • HenLen77

    If you application was unable to find a .dll it was hard bound to, you would generally get an error message from the Windows loader.  If a late-bound dependencey is missing (and this is managed code), you'll end up with a TypeLoadException or the like.

    The fact that your app is just exiting is a bit strange.  The first thing I would do is follow Suzanne Cook's advice on Debugging Assembly Load Failures, and seeing if FusLogVw helps you out.

    However, if you're not seeing a managed exception, then I doubt that will help much.  Another step to take would be to run your application under a native debugger (such as WinDbg) and see what information is dumped to the debug window.  You can get the native debuggers in the Debugging Tools For Windows package, which also includes gflags.exe.  You can use gflags to turn on Windows loader snaps to get much more detailed information dumped to the debugger about dll load issues with your application.

    -Shawn

  • Ping06

    Hi, 
       Just a dumb idea:
       Try to create a setup project for your Application. The setup usually shows all the dependencies.

  • Application won't start without Visual Studio