So I made a simple calculator console application with C# and Visual Studio. Now I gave the .exe file from my debug folder to a friend to test the application. Unfortunately, when he tries to open it, nothing happens.

I made him check if he had .Net Framework which he has. Also nothing on the task manager or anything. He says that simply nothing happens. I made the app to be run-able on AnyCPU. I tried running the application on my other computer which I could without a problem.

Also he has Windows 8, and has SmartScreen activated which of course popped up with an alert but he said that he forced it to run it, so I really don't know what is wrong. I hope you guys might know what's going on here.

  • 1
    You're probably missing a dependency of some sort. Check the application event log for errors; it should give you a direction to proceed. – Lynn Crumbling Jan 8 '13 at 18:32
  • Try building to a lower version of the .NET framework or publishing the solution as you said you only sent him the debug file – Ashley Medway Jan 8 '13 at 18:34
  • 2
    @raddry, Check the EventViewer for errors on the client machine, it should let you know what causes this problem. – platon Jan 8 '13 at 18:34
  • 2
    How does your friend "try to open" the .exe? He says "nothing happens" but then says he "forced it to run"; those two statements contradict each other. Find out what your friend is doing before wasting more time on this. – Dour High Arch Jan 8 '13 at 18:36
  • @DourHighArch He says the first time he tried to open it, he said he foced it ( don't know how ) but nothing happened afterwards and now he disable SmartScreen and when he tried to open it it doesn't work either. Simply nothing happens. – raddry Jan 8 '13 at 18:48

You cannot force SmartScreen, you must disable it (at least I had to.) Anyway compile with x84 (also 64bit architecture can execute this.*) What Framework are you targeting? Windows 8 has standard 4.5 installed, to run programs under 3.5 it must install .NET 3.5 (it should automatic popup)

Try to Release build instead of Debug. (Its at the top bar, enable Advanced Settings.)

*IA64 cannot execute it, AMD64 can. To change the architecture of the program: Go to Project, the tab Build, then you see Platform Target change it to x84.

To disable smartscreen: Windows + Q search for SmartScreen, you get 'Maintenance Center', on the left click 'Change Windows Smartscreen Settings' then select the last radiobutton.

I translated everything roughly, it could be called different in English

  • Indeed I do have Windows 8 as well and disabled SmartScreen, I think I remember that you couldn't force it to run an application but my friend told me he was sure about it. I'll ask him to disable it and tell the results in a few mins. – raddry Jan 8 '13 at 18:37
  • According to (msdn.microsoft.com/en-us/library/ff602939.aspx) .NET Framework 4.5 is backward compatible with previous .NET Framework versions. So, there should not be necessary to install the previous version of the .NET Framework. – platon Jan 8 '13 at 18:38
  • 1
    @platon You need to add a framework to your apps config, to say it's okay on on a higher framework, otherwise the OS will insist that you install it. Should, doesn't mean it will work, it means it might not. :( – Tony Hopkinson Jan 8 '13 at 18:43
  • I thought its not backward compatible because I tried to open an application (which targeted on .NET 3.5) and it said that it was required to install .NET 3.5 (other versions of .NET are also installed at that install) – iVision Jan 8 '13 at 18:44
  • @raddry Can you tell me how your friend did that? (I'm almost sure that you can't 'force it'.) – iVision Jan 8 '13 at 18:44

I had the same problem when I copied the .exe file (Debug or Release) to another machine and it would simply not work! Showed up in task manager for a few seconds and would disappear leaving only an ArgumentOutOfRangeException and a Kernelbase.dll error in the application event logs. So I decided to install Visual Studio on the machine where the file would not launch. After copying the project folder to a different file structure than on the original machine and hitting compiling it, I found out that I was trying to cut a string (file path) shorter than it was (due to different file structure). So the problem was in the code itself and NOT in any .dlls or .NET versions. Hope I have helped!


I had similar issue with moving EXE files to a different machine.

I did a bunch of searching and it ended up being that the new machine (that the EXE didn't work on) didn't have the most recent (or maybe not at all) Microsoft Visual Studio C++ Redistributable files.

I simply went to The latest supported Visual C++ downloads and installed the newest vc_redist for my machine. The EXE worked just fine immediately after that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy