Reputation: 445
I have a program that graphs a text file with some data in it. It works in the debug/release modes of VS 2010 C#. I'm using the .Net and Aforge frameworks. In my references is AForge.Math and the System.Windows.Forms.Charting libraries.
When I run the executable in the ...bin/release folder it works completely, meaning that when I drag and drop my text file into my form a graph appears, as it should. However if I copy that release folder onto another computer the .exe runs but when I drag and drop the text file it doesn't plot. I just get a white blank form. This is what the program should look like when it's working...
when it's not working it does something like this(so I've attempted to drag and drop a text file into the form) and I get something that looks like this....
I suspect that my problem comes from using the AForge framework. All the computers have the .Net so when the data is input the charting continues to work but the data that is being graphed comes from AForge which is not on the computer. Although I am not entirely sure.
Upvotes: 2
Views: 3645
Reputation: 7025
You should copy all the DLLs that you find in your debug or release folder. But sometimes not all the DLLs appear there. If you are using a framework maybe is looking for these DLLs in the installation directory or the GAC.
In this case that AForge is an external dlls so you have two solutions:
Personally I would try the last one.
Upvotes: 1
Reputation: 3653
Open your solution in Visual-Studio and expand the references from the solution-explorer. It should show you a reference list of all DLLs your project is referring to. It must also include your AForge framework if it is used.
Now all you have to do is to ensure that the same set of DLLs are present on the target system: Either in the exe's own path (This will be applicable for your custom DLLs such as AForge FW) or In the GAC (Global Assembly Cache) (Applicable for libraries that are installed such as your System.** framework libraries and MSOffice DLLs).
If something is missing, just copy the additional DLLs to your .exe folder on the target machine.
Upvotes: 0
Reputation: 8926
Try setting all your references to be copylocal = true, this should put a copy of the dll in the bin\release folder so you can copy them to the other computer.
Upvotes: 0