Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Jan 9 '13 at 5:57

This question came from our site for professional and enthusiast programmers.

    
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

1 Answer 1

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

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.