Thread: dll error

  1. #1
    Registered User smahdi1991's Avatar
    Join Date
    Nov 2009

    dll error

    i finished my project and its realy good working on my laptop and good running on my pc
    but on my friends laptop it doesnt work ,it has a problem and that is :cannot find dll
    my programm need .net4
    these two are instaled in system but i have that problem.
    (can it be from visual studio2013(because i have instaled vs2013 on my laptop and pc but my friends doesnt?)?)

  2. #2
    Registered User
    Join Date
    May 2009
    5 seconds on Google got WinPcap - Home

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  3. #3
    Registered User smahdi1991's Avatar
    Join Date
    Nov 2009
    this is the error
    An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
    i want know why this problem happen?
    why it is ok in my 2 system and it has problem in my friends system?
    i tryied some ways to do that but it gones and another problem is coming

  4. #4
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    If you want your code to run properly on another system you must distribute it correctly. There are two options. If your friend is a developer and they have the correct libraries installed then it will work. The second option is some type of deployment strategy. MSVS use to have very good support for setup and deployment but now I would recommend using an open source installer. The installer should detect that .NET 4 is not installed and will proceed to download and install it from Microsoft. Getting C# to run on other Windows-based systems is far far simpler than C++ but both come down to proper deployment of your application.

  5. #5
    Registered User smahdi1991's Avatar
    Join Date
    Nov 2009
    my friend, yesterday instaled the vs2013 and the programm load corrctly with out a problem.why that problem happened?(notice that the .net4 ,4.5 as installed before that but had that problem ,but after instaling the vs2013 the probelm was go away. )
    (i want put my programm for opn source in the net but i cant to say to people you must have vs2013)
    (can its reason for ,because i developed my programm with vs2013?)

  6. #6
    Registered User
    Join Date
    Jun 2005
    Have you actually bothered to read the replies earlier in this thread?

    You're building your program so it relies on there being a particular library installed in order to run. It will not run without that library. Clearly the library is installed with vs2013, but is not (necessarily) on a default windows installation.

    As VirtualAce said, you need to deploy your application - when it is installed on another machine, you need to ensure the libraries it needs are also installed.

    An alternative would be to tweak your build options in vs2013 so your program is built statically (i.e. the functions and static variables required to run are included in your executable, rather than in another library that needs to installed with your program). Trade-off with this option is that your executable files will be significantly larger and, if the library you're using (NET 4) is updated by Microsoft, that your program will not receive benefits of those updates unless you rebuild it.

    The rank amateur approach is to tell people who want to use your program that they must install NET 4 or VS2013. That will be okay if the only people who use your programs are developers who are willing to install additional things your program needs. It will annoy people who don't want the additional hassle of installing things so your program can run.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  7. #7
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Rishon LeZion, Israel
    In VS2013 - You can created a project of type "Setup and Deployment" (at least Premium version)

    Adding your main project output to the setup project and building it - will create a setup.exe which install your application with all needed dependencies on the target computer.

    Visual Studio Installer Projects Extension - The Visual Studio Blog - Site Home - MSDN Blogs
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 10-29-2012, 03:33 AM
  2. Replies: 15
    Last Post: 11-28-2011, 11:48 AM
  3. Replies: 4
    Last Post: 07-24-2011, 09:38 PM
  4. Replies: 1
    Last Post: 11-15-2010, 11:14 AM
  5. Replies: 3
    Last Post: 10-02-2007, 09:12 PM

Tags for this Thread