-
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?)?)
-
5 seconds on Google got WinPcap - Home
Tim S.
-
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
-
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.
-
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?)
-
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.
-
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