2

After fighting for quite some hours now, I think it's time to ask for some help. I'm quite new on C# development and Visual Studio environment so maybe it's something really stupid I have missed. I also searched for some answers and try some solutions (install SDK, change some thing on VS) but nothing helped. Anyway here is the problem...

I developed a small WPF application that is working great in Visual Studio. No errors, nothing. Compilation? Same. No error. Publishing? No error. When I try to launch the .exe file generated... Well nothing happens. I see my mouse cursor with the waiting cursor. The exe file is visible in my task manager and stay there until I restart my computer. When I try to kill it using the task manager, I have an error saying that I can't. When I try by using taskkill command line, it says the process does not exist...

As I expected something wrong with my app, I just created a blank WPF app, saved it and built it. So we can't make easier. And same problem. So I guess the problem is coming from some configuration in Visual Studio or something like that...

If anybody has an idea or some tips to debug the compiled app (there must be some error thrown somewhere I guess) I'll be so grateful.

Regards.

Edit

Some notes:

  • Even the simple WPF application that only displays an empty WPF form has the problem.
  • Output Type is "Windows Application"
  • I try to use the compiled app on the same machine as I developed it.
Baboulinet
  • 21
  • 2
  • What's the output type of your project? – diiN__________ Mar 02 '16 at 15:25
  • What does your app do? Does it try to read some files or connect to a database or call a web service at the start? – Mark Mar 02 '16 at 15:29
  • 1
    are you running the exe on the same machine, or another machine? – BugFinder Mar 02 '16 at 15:30
  • @diiN_ It's "Windows Application". – Baboulinet Mar 02 '16 at 15:31
  • @Mark I have this problem even with the simplest app I can do (show an empty WPF frame). – Baboulinet Mar 02 '16 at 15:33
  • @BugFinder On the same machine. – Baboulinet Mar 02 '16 at 15:33
  • Any chance its starting off the edge of the screen? any errors in your eventlog? – BugFinder Mar 02 '16 at 15:46
  • What is the name of exe-file you are trying to run? [`Something.vshost.exe`](http://stackoverflow.com/q/774187/1997232)? Then it's a wrong exe-file. – Sinatr Mar 02 '16 at 15:46
  • `As I expected something wrong with my app, I just created a blank WPF app, saved it and exported it. ` exported it to where and how? Do you mean build it? – mcy Mar 02 '16 at 15:54
  • 1
    If the type of application is "Windows Form," then it is not a WPF application. This question makes little sense. – Cody Gray - on strike Mar 02 '16 at 15:55
  • 2
    You should of course be able to kill a zombie process with Task Manager. Which tells you that the *real* problem is a borken machine. A very common problem lately, uninstall Avast. – Hans Passant Mar 02 '16 at 16:03
  • App is not outside of the screen and no error in the event log. I made some errors. Output type is windows application (you're right it made no sense what I wrote before) and by export I meant build yes... I was trying to run the correct exe file (app.exe and not the vshost.exe). – Baboulinet Mar 02 '16 at 19:52
  • 1
    @HansPassant Huge thanks! I never expected that could be an issue but Avast was indeed the problem. I disabled it and everything is working perfectly. And thank you for the others as well. :) – Baboulinet Mar 02 '16 at 19:59

0 Answers0