4

How do I run the executable on other computers without creating a configuration,

 2 years ago
source link: https://www.codesd.com/item/how-do-i-run-the-executable-on-other-computers-without-creating-a-configuration.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How do I run the executable on other computers without creating a configuration,

advertisements

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...

Gjpcz.png

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....

RrBFp.png

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.


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:

  1. Install AForge in all the pcs where you want to copy your program.
  2. CopyLocal True: In the references, in each AForge DLL, get sure that CopyLocal is true. Check this link for help on setting up CopyLocal=true. Then these DLLs will appear in your debug/release directory so when you drag all the references will work. Get sure that you copy all the files inside of debug/release folder, specially .dll, .exe, .config. Once you have it working maybe you can avoid copying .pdb files.
cMTBo.jpg

Personally I would try the last one.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK