Like Tree5Likes
  • 1 Post By VirtualAce
  • 2 Post By grumpy
  • 2 Post By vart

dll error

This is a discussion on dll error within the C# Programming forums, part of the General Programming Boards category; i finished my project and its realy good working on my laptop and good running on my pc but on ...

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

    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
    winpcap
    ----
    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
    Posts
    2,688
    5 seconds on Google got WinPcap - Home

    Tim S.
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning." Rick Cook

  3. #3
    Registered User smahdi1991's Avatar
    Join Date
    Nov 2009
    Posts
    19
    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
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    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.
    stahta01 likes this.

  5. #5
    Registered User smahdi1991's Avatar
    Join Date
    Nov 2009
    Posts
    19
    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
    Posts
    6,438
    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.
    stahta01 and smahdi1991 like this.
    Right 98% of the time, and don't care about the other 3%.

  7. #7
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    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
    stahta01 and smahdi1991 like this.
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

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, 10:48 AM
  3. Replies: 4
    Last Post: 07-24-2011, 09:38 PM
  4. Replies: 1
    Last Post: 11-15-2010, 10:14 AM
  5. Replies: 3
    Last Post: 10-02-2007, 09:12 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21