What file to give a friend for testing

I am running Visual Studio. Iwan to send someone to try a simple program. I do not want to send him the "Source File". " In other compiler program; I used to find an "*exe" file clearly. And, this ".exe"file can work in any computer. Can someone tell me what should I do?
The .exe file will probably be in {project dir}/bin/Debug or {project dir}/bin/Release
If there are more dependencies, it might say what they are when you try to run the exe on another (non-development) computer. Usually with VS it's some VC++ runtime redistributable needed.
It is possible to link all the C/C++ runtime into the executable, though that really porks up the size. Better route might be to give "the friend" a copy of the redistributables for the C/C++ runtime DLLs.
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

@Ganado, default with VS 2017/2019 is {project dir}/Release or Debug for 32-bit and {project dir}/x64/Release or Debug for 64-bit.

It is possible to change on a project/solution level basis where the exe file(s) are written to.
Last edited on
".exe"file can work in any computer. Can someone tell me what should I do?

while I get what you mean, this is nonsense. even if you really meant 'work on all windows computers' its a tall order. If you compiled it for 64 bit machines, it will not work on 32 bit machines. If you compiled it for 32 bit, it will usually work on 64 bit machines but not always depending on what you did in the code (most likely nothing you did will be an issue, given that you are just starting out). If your friend has a relatively modern 64 bit windows machine, the tips above should get you going, but be aware that there are compatibility issues in compiled languages sometimes.
Last edited on
Just one more thing...
dir /s *.exe
will print where every .exe file (recursive starting from current directory) is.
Thanks everybody for trying to help:-

For jonnin: Although you concentrated on the point that was not the real problem, but you brought up a very good subject, which is how to solve the problem you have just mentioned which is running program compiled in 32-bit program in 64-bit machine. I made an old program in an old 32-bit machine. now I am unable to run it in my new machine. Can you advise me how to do that.

When I said " "*.exe" file can work in any computer" I meant that the source file needs a compiler. My friend does not have compiler. He does not know much about programing
32 bit works on 64 for windows more often than not with just a little TLC (16 bit is dead though). Ive got many an old 32 bit game running on my 64 bit winx system without a lot of problems. The other direction is unpossible: you simply cannot run 64s on 32s.

You can right click an executable and force different compatibility modes. You can run a 32 bit windows VM, in the worst case. If you have the source code, you can just recompile it for 64 bit. If its a big fancy program, you may just have some dll issue and those kinds of things may or may not be fixable without the VM.
I would probably go in 1) recompile if you can 2) compatible mode 3) other approaches due to increasing difficulty in fixing it after 1 and 2. Got error message? What program is it (many commercial products have info on how to get it working from someone who fixed it)? Any info can help beat it into working. What OS was it for?
Last edited on
Thanks everybody for help or trying to help.

To Furry Fuy: I want to the recommended website and downloaded the "redistributables software" I can see it there form the control panel, but I do not know how to find it or use it. I appreciate it if you can give more details.

I also must thank you because I found that there was a service pack, that I never knew about it. It was available of download , too.
The redistributables is an installer executable. Double-click and follow the dialog prompts. "Your friend" will then have the Visual Studio C/C++ runtime libraries installed on their computer so you can reduce the size of your app you share.
Nowhere in this thread has any error description actually been given.
@Ganado, there is no error description because there hasn't been an error. The OP is trying to prevent a runtime error/problem on his "friend's" computer.
Many thanks to Furry Guy. You said "Double-click and follow the dialog prompts". I have no idea where to click. All I did was downloaded the software and installed it. I have no idea where it was installed. May be it was integrated with the VS.
The installer puts the VS runtime DLLs in a location Windows can find them when needed to run an app created with Visual Studio.

On my Win 10 Pro x64 system that happens to be C:\Windows\SysWOW64\ for 32-bit apps, C:\WINDOWS\system32\ for 64-bit. YMMV.

You are overthinking things. When you installed VS it added quite a number of DLLs to your system. The redistributable installer adds only the DLLs used by apps needing the C/C++ runtime system.
Last edited on
Topic archived. No new replies allowed.