ClickOnce Program Not Starting - visual-studio

For some reason a ClickOnce program I made in VisualStudio will not run. The program runs normally if I compile it, and I have made ClickOnce programs in the past that have run on my computer, so I know it works. I get no error messages, and the program never shows in the Task Manager. Any ideas what could be wrong?
EDIT: I found the problem. It wasn't including some text files that my program opens and reads when it starts. I'm guessing the program terminated when it didn't find those files, but why did I not get an error message pop up?

Related

Debugging Spawns A Non Terminable Process, and CLI not launching

I've been fighting this little problem for a while now, so I'm really hoping I can get some help. I've been looking for a solution to this, and I found this SO question: Debugging doesn't start.
My issue is somewhat similar to the issue discussed here, except that my issue is a two-parter.
Part 1: Similar to the issue discussed on the other question. (Debug Window Doesn't show up)
When I attempt to launch my Windows 32 console application project (The simple kind that opens in the windows CLI). The CLI (or CMD) window doesn't open, and windows idles giving me a spinning cursor wheel. Visual Studio IDE (I'm using VS 2013 Community) becomes unresponsive and I cannot access any menus, or use any hotkey to "Stop Debugging". One difference from the provided SO question though, is that when I try to launch "MyProject.exe" from my project's "Debug" folder I get the same result as attempting to debug in the IDE.
Part 2: Unkillable Process
When I try to close my debug application in the windows task manager, it is not listed as an ongoing process. However, whenever I try to manipulate, delete, or otherwise modify my Project.exe application (in my Project's "Debug" folder), windows informs me that the application is in use. Confused by this, I downloaded two applications. The first was Process explorer, which showed me that I did in fact have 2 instances of "MyProject.exe" running. The second was Process Hacker, which also showed me 2 instances of "MyProject.exe". However, neither of these programs were able to terminate either of the "MyProject.exe" processes.
I am capable of terminating the processes for visual studio and restarting the IDE, however, because the "MyProject.exe" processes are still running. Building always fails with the error
"Error 1 error LNK1168: cannot open C:\Users\Brandon\Desktop\MyProject\Debug\MyProject.exe for writing"
Whenever I restart my computer, the lock files (as expected) are removed, and the "MyProject.exe" processes disappear. I can restart VS and everything works, but if I try to Debug (pressing "Start Debugging" or F5) the same issue occurs.
A process of my program is started ("MyProject.exe"), but the CLI window where my program's text should appear doesn't show up. Visual studio locks up, and "MyProject.exe" persists until the next restart because "MyProcess.exe" cannot be terminated.
My solution configuration is set to "Debug", Solution Platforms = Win32.
I have tried creating a new blank console project in VS 2013 and I get the same result: code builds fine, but I have the same debugging issue. I get an identical result with a quickly assembled "Hello World" project.
Sorry for being a noob, but honestly. I really don't know what's going on, so any help is greatly appreciated.
(Note: Running Windows 10 with VS2013)
EDIT (UPDATE):
So, I'm having the same problem with several programs in Windows 10 (most notably Allegorithmic's Substance Painter). So it looks like this may actually be an OS problem. Several of my programs whenever I try to launch them do the same thing...the program acts like it's going to launch, but then no usable window appears. Looking at my processes I can see that the process has been started, but it is once again unkillable. For reference, I am using Windows 10 Version 1511 (OS Build 10586.17).
I believe your problem might be Avast, if you are running it. I had exactly the same issues until I uninstalled it. Had upgraded to Win10 and VS2013 just froze, same as you described.
Cheers.

VB6 program when run as schedule task freezes until focused

I have been searching the web for an answer however came up with nothing. I created a VB program that calls a .bat script to call commands to run a WinSCP script. This WinSCP script simply transfer files from a sftp (linux) server to a windows machine. When running the program either via VB6 IDE or as a compiled executable the program run as normal.
However when running the program as a schedule task the program freezes and only runs until focus is brought to it. Have any encountered this error? (I'm running win 7 32bit)
There was a question similar to mine that was asked here however about VBScript and it seems the person was able to pin point the line causing the issue, not the same for me. Here is the link to the thread vbs runs by double clicking, freezes when run from task scheduler
Thanks in advance,
j3rg
I have found what was causing the error to occur. My project consist of a form and a module. I call the form via the module in the manner:
form.show
I forgot to set in the properties of the project to have the program start from the module Sub Main sub-routine. After selecting this option the program work as normal when called by a schedule task.
I hope this information help anyone that runs into the same scenario.

PyInstaller Created App WIll Launch from cmd but not from explorer

I am having some problems with a app we are making with wxWidget/wxPython and PyInstaller.
We have compiled the app into a single exe for windows but:
1) On some machines it will not launch at all. It doesn't generate a error or anything in the app logs. It just stops almost immediately.
2) On some machines it will launch fine from cmd but not from explorer. again, same behavior. It just stops almost immediately. I don't even see it pop up in the process explorer.
3) On some machines it works just fine.
Are there any tips on how I can figure out what is going wrong? Is there a way to launch a exe with a debugger?
There are a few things you may want to look into:
Did you compile it as "one file"? I have heard that one exe may be blocked by some antivirus programs. It uses a few of hacks to get everything in one executable which may be considered malicious.
Did you compile it as Windows app (no console)? You may want to enable console and run it on machine where it does not run at all from console. That way you may see why it crashes.

mt.exe unable to terminate

Sometimes when I compile C++ code using nmake, the build process gets stuck at the manifest tool mt.exe (see the bottom of this screenshot - http://i.stack.imgur.com/pgyzT.png). It just never finishes, but if I cancel the build process and start again, it may run past the last point but get stuck again at another seemingly random mt.exe process. This makes building big software very cumbersome, as I need to "monitor" the build process to know when to cancel and start again from the beginning.
I'm clueless as to what could be the reason to this behavior. Has anybody encountered this problem before?
Edit: I'm using Windows 8 x64, the mt.exe comes from Windows SDK 6.0A.
I had similar problems with msbuild getting stuck at random points. Never found out what caused it, but a workaround that worked for me was to disable parallel building of projects.
Trying disabling your anti-virus on-demand scanning when building. I have seen some anti-virus software block access to a file using mt.exe, though usually you get an error instead of a hang.

Visual Studio unable to load necessary dll's to run project

I am trying to run a project in Visual Studio 2010, and for some reason it seems like I can't... the command-line window is closed instantly and the debug info is the following:
'exercise01.exe': Loaded 'E:\e\work spaces\C++ projects\exercise01\Debug\exercise01.exe', Symbols loaded.
'exercise01.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', Cannot find or open the PDB file
'exercise01.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', Cannot find or open the PDB file
'exercise01.exe': Loaded 'C:\WINDOWS\system32\msvcr100d.dll', Symbols loaded.
The program '[5900] exercise01.exe: Native' has exited with code 0 (0x0).
what might be the cause for these two dll's to not get loaded? and is the fact program exited with code 0 related to my program not running, or is there another problem?
I know others have published such questions before, but unfortunately I couldn't fine any useful info anywhere, so forgive me if I'm re-uploading a question... I'm pretty much a noob when it comes to programming in C, and in Visual Studio in general, so please have patience (:
thank you :)
First thing to check: Are these files actually there. Maybe windows is installed in a different directory and an environment variable is pointing to the wrong place.
If the files are there it is probably an authentication problem. You are running from the command line window. You may be running this in the context of NETWORK SERVICE. Try starting the command window, by right clicking on the menu and selecting "run as administrator".
Basically, your program was started and quickly ran to completion.
When you start debugging a console mode VS project, if your program doesn't stop somewhere or hit a breakpoint, it'll just run the program and when the program exits the window will close.
This is different behavior than if you run the program without the debugger - VS will keep the console window open when the program terminates.
Anyway, you can wither set a breakpoint on main() (or some other convenient location) or instead of simply starting the program with the debugger, you can "single step" into it, which will immediately break into the debugger and stop executuion.

Resources