none
program will not run without debugger

    Question

  • I'm getting back to coding after many years away, and I'm starting with VS 2015. Just wanting to try VS, I created a C# app for Windows Forms. Just the main window, in which I put a button and a textbox. On button push, text appears in the textbox. When I debug it, it works fine, runs, does what it should, and closes fine. But when I run it without debugging, or I build a release or debug version and run it from Windows Explorer (outside VS), very strange things happen. No window appears. If I run it without debugging in VS, VS clocks forevee. In both cases (from inside & outside VS), the task manager shows 3 instances of the program, and I'm unable to kill the tasks, either from Windows Task Manager, or from Process Explorer. Thanks.
    Thursday, December 03, 2015 5:26 PM

All replies

  • Just to exclude: Have you already tried to deactivate anti-virus temporarily, for recently there are frequent reports about problems with security software (Avast?) and Visual Studio generated applications ...

    With kind regards

    Thursday, December 03, 2015 7:19 PM
  • Yes, deactivating Avast is one of the many things I've tried. I've also tried a number of other things, all to no avail:

    1. With VS 2015, I also tried building a Windows WPF C# app (following the tutorial in VS,  1 dialog box, 2 radio buttons, one Textblock, one button), same results

    2. I dusted of my old VS C++ toolkit (6.0, 1998!), built a simple app, same results, except I WAS able to close down VS;

    3. Tried running the app I built w. that old toolkit on a previous version of Windows (5? can't remember), ran fine.

    Any help would be greatly appreciated


    Saturday, December 05, 2015 4:57 PM
  • I've run into the exact same problem, Hal. I've yet to find a solution. I went so far as to update my OS to Windows 10 to get a "clean" install but it didn't do any good. I saw suggestions to turn off the vshost process but that didn't accomplish anything either. I reverted to Windows 7 because I don't like 10.

    In addition, it gets stranger. I had successive versions of Studio installed so that I could develop and maintain apps written in a specific version. I do custom development so I want to avoid clients needing to update framework versions, etc. All Studio versions started doing the same thing. Even weirder, some existing apps behaved and others didn't. I also looked at the solution property pages and noticed that new projects had a list of directories in the debug directories as long as my forearm. Existing apps only have two, however, the paths listed don't exist. Makes no sense. It could be looking at the environment variables, I guess. I doubt that has anything to do with this particular issue.

    Hopefully, somebody who has a clue will see this thread and provide some enlightenment. I've been fighting this for a week. If I find a solution, I'll be sure and post it.


    Jeff AKA "Prof"


    Sunday, December 06, 2015 4:49 AM
  • Hi Hal Tzeutschler,

    >>the task manager shows 3 instances of the program, and I'm unable to kill the tasks, either from Windows Task Manager, or from Process Explorer. Thanks.

    You just run one app, why it has 3 instances? What are the three instances? As you said that if you couldn't close this processes, whether this files was called by other processes or third party tool?

    If you run your app in safe mode, how about the result?

    https://msdn.microsoft.com/en-us/library/ms241278.aspx?f=255&MSPPError=-2147217396

    Or you could really know that which processes really locked/called your project files.

    http://blogs.msdn.com/b/calvin_hsia/archive/2009/07/28/9851739.aspx

    Restart your machine, copy your project files to other shared folder, and then check it again.

    Please close all third party processes or software in your windows.

    To really make sure that whether it is related to your Environment, please also test it in other VS machine.

    Please also create a blank solution, and then add the project files to the new blank solution, check the result.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, December 07, 2015 8:11 AM
    Moderator
  • Jack,

    When he says three instances he means three instances. If you create a project called Test, then select Start Without Debugging from the debug menu, you will see Test.exe listed three times in the Task Manager. Sometimes you can kill one of them with TM, sometimes not. The only way to get rid of the "extras" is to reboot. This happens whether you're trying to run or Release configuration or a Debug configuration.

    Further if you try to run the program from the Debug or Release folders with VS turned off, the same thing happens. In either case, the program does not run. If you choose to run the debugger the form for your test program pops up - again in both configurations.

    I tried to uninstall Community 2015 and it has run for nearly 24 hours. It won't run at the moment but I'll try to repair it and try the blank solution idea. My 2012 Desktop Express doesn't give me an option to create a blank solution.

    As an aside, I had uninstalled all VS versions, re-installed 2012 Express and then re-installed VS Community 2015. During the install it tried to find a file called vc_minimumInstallXXX.msi(I'm running 64 bit, so I assume it was looking for 64 bit and 32 bit intall packages. However, the directory the installer was trying to find does not exist, nor ever has, existed on my machine. In addition, I searched the iso and my entire C: drive for the files it was looking for and they didn't exist. I installed 2013 Community prior to this with no installation hitches. The behavior, however, was the same. The whole problem started with that install. Since then nothing has worked properly.

    I'm going to run Repair VS 2015, try the blank solution idea and post the results. I can't move to another machine because I don't have one.

    Thanks for the response, by the way.


    Jeff AKA "Prof"

    Tuesday, December 08, 2015 1:39 AM
  • >>I'm going to run Repair VS 2015, try the blank solution idea and post the results. I can't move to another machine because I don't have one.

    If you get any latest information, please feel free to let me know.

    >>The whole problem started with that install. Since then nothing has worked properly.

    Actually this forum is to discuss the VS IDE usage, if we make sure that it is the VS setup issue, I suggest you post a new issue in the VS setup forum:

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vssetup

    Please also collect the log messages:

    We can use http://aka.ms/vscollect  to gather the VS and .Net Frameowrk installation logs. After using it, you will find vslogs.cab from %temp% folder. Please upload the file to Onedrive and share the link in your new thread if we make sure that it is the VS setup issue.

    Sincerely,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, December 08, 2015 9:33 AM
    Moderator
  • Jack,

    So far, no luck. The 2015 repair failed, so I uninstalled it and tried to reinstall. I got the same results. I can add a little more info, though. The path to the minimumRuntime installer that I thought didn't exist does. The top level folder was hidden and the file was there but the installer still declared it to be invalid. as a bit more info, it doesn't matter if I try to install from the iso or the Web installer - the result is the same.

    I finally gave up and uninstalled 2015 using Revo Uninstaller Pro to find and remove everything the installers put on my machine and installed 2013. It took many hours and two or three reboots but it finally installed and didn't give me any complaints along the way and reported the install as successful. Unfortunately, however, the behavior was exactly the same as both Hal and I have reported.

    I downloaded and ran the tool you specified. I didn't get a cab file but it did create a zip file. I also took screenshots of the Task Manager so you can see what it's showing me. In one of them you can see the form and the Task Manager. That one is the result of running the debugger. You can see that it shows the vshost process running but not the project exe. The other is running the project without debugging. The ide host process is running and there are suddenly three instances of the project process running but the form does not come up. You also get this result if you try to run the project using the actual exe rather than the IDE.

    I uploaded the zip file and the screenshots to OneDrive. Here is the link:

    https://onedrive.live.com/redir?resid=F7C8FEF10853AB4E!157&authkey=!APwpQCCuSeXcH7g&ithint=folder%2czip

    If this turns out to be an installer problem - which I think it is - is it possible to move this entire thread to the forum you suggested rather than start a new thread there? I doubt that I can but can you - being a Mod - do this? I don't have a problem with starting a new thread but it would be nice to have this whole thing over there so that people can see the entire discussion without have to go through it all over again.

    For now I'll keep an eye on this thread and see what you can come up with.

    Thanks for your help, Man.

    Oh, I meant to also say that I'm strongly considering uninstalling everything and installing Express version from 2010 up through 2015 and see if that gives me "good" installs. I'll wait on your verdict before I do that. That's a LOT of time and work.


    Jeff AKA "Prof"


    • Edited by ProfessorMetal Wednesday, December 09, 2015 5:44 AM Added last paragraph
    Wednesday, December 09, 2015 5:41 AM
  • Thanks for your friendly response, ProfessorMetal:)

    If you disable the project property "Enable Visual Studio hosting process", and then clean and rebuild your app, test it again, how about the result?

    Sincerely,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, December 10, 2015 11:20 AM
    Moderator
  • No problem, Jack. We're all professionals. :-) I've tried disabling the vshosting. It had no effect. I've tried everything I could think of. I even uninstalled everything and then reinstalled 2008 Express. My thought was maybe I had accidently deleted something shared by all the dev platforms and reinstalling them in release order me get me back up to speed. No such luck. 2008 failed so I didn't bother to go any further down that road.

    Like I said earlier, one of the strangest things is that some apps created earlier run flawlessly. Some don't. Unfortunately, one of the ones that doesn't is an app I've done work on for a client. Not a good situation. :-( BTW, I can, apparently, do web app work. I have a site online called White Wolf Custom Software and editing it and running it from the IDE gives no problems. My guess is that it's because it's running on the development server and not trying to run the exe. If I make changes to the app(it's a Web Application, not a Web site) and redeploy the app to my host it works fine.

    It seems that something is going wrong with the build for desktop apps and the exe is corrupted - that's just a guess. As before, I'll keep plugging away on my end. I'll keep a watch on this thread for anything you may come up with and post what I find on my end.

    This is frustrating but that's life as developer. :-)


    Jeff AKA "Prof"

    Friday, December 11, 2015 12:53 AM
  • Hi ProfessorMetal,

    I found some error messages:

    >>[1258:1894][2015-12-07T22:49:01]e000: Error 0x80070004: Process returned error: 0x40010004
    [1258:1894][2015-12-07T22:49:01]e000: Error 0x80070004: Failed to execute EXE package.
    [15C4:19C4][2015-12-07T22:49:01]e000: Error 0x80070004: Failed to configure per-machine EXE package.

    In addition, it also has many error messages in the VSSetupEvents.txt file, I think it would be the setup issue.

    Since this case was created by Hal Tzeutschler for a few days, and there are some possible reasons which generate the same issue, since we make sure that your issue would be related to the VS Setup, if possible, please open a new case here:

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vssetup

    The VS setup members would help you troubleshoot this issue.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, December 11, 2015 10:22 AM
    Moderator
  • I'll do that, Jack. I may copy the texts of some of the posts from here and paste them into the new thread so we won't have to rehash all the info. Thaanks again for your help, Man.

    Jeff AKA "Prof"

    Saturday, December 12, 2015 1:04 AM
  • You are welcome! ProfessorMetal:)

    Thank you for your support and co-operation.

    Have a nice day,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, December 14, 2015 2:57 AM
    Moderator
  • Have a great day, yourself, Jack. I'm going to start a thread in the forum you suggested and include our correspondence here to prevent unnecessary repetition of what we've gone through. It may take all of us but we'll figure this out sooner or later.

    Thanks again, Bud.


    Jeff AKA "Prof"

    Monday, December 14, 2015 7:50 AM
  • Yes, I AM still here,and thank you all for all the work you've been doing. Unfortunately, being a recreational programmer, I can't devote as much time as I'd like to to help finding a solution. If this thread gerts moved to another forum, how can I find it? I'm real new to these forums, and the only way I know how to find this thread is to click on "My activity"
    Wednesday, December 16, 2015 9:32 PM
  • Hi Hal Tzeutschler,

    >> If this thread gerts moved to another forum, how can I find it?

    You still can find this thread by click on "My activity". In addition, you can click "Alert me" on top of the original post and set your email. Then if this thread has any replies, forum will send you an email about the new reply.

    In addition, Jeff had create a new thread on setup forum and resolved the problem. I find you add replies on that thread, but the thread has been closed. So I suggest you create a new thread rather than add replies on that thread.

    Best Regards,
    Weiwei

    Thursday, December 17, 2015 5:22 AM
    Moderator
  • You're welcome, Hal. It seems you've found the other forum, so I won't rehash things here.

    Jeff AKA "Prof"

    Thursday, December 17, 2015 8:41 AM
  • Hi ProfessorMetal & Hal Tzeutschler,

    I found that you discussed this issue here:

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/aaea5e84-0d6d-4a1c-a768-bb5b44e027e8/program-will-not-run-without-debugger-original-thread-topic?forum=vssetup#29c48d67-049d-4acd-9edf-d648eefaecea

    @Hal Tzeutschler, maybe you could share us your setup log, so we could help you analyze your setup log, even if you got the same issue as ProfessorMetal, maybe it is not the same reason. If you could share us your setup log, at least, we could know that whether you still got the setup issue.

    Of course, if you make sure that it is the setup issue(not the VS General issue), since many replies in this threads will impact your discussions in the above new thread, I will not merge this thread's replies to that new one. Would you mind changing this thread to be a discussion thread if it is the setup issue?

    If there's any concern, please feel free to let me know.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, December 21, 2015 3:00 AM
    Moderator