[RESOLVED] Project Wont Run When Pressing Play Button
I've inherited a program from another developer. The software was originally written in VS 2008 and I have VS 2010. Everything appears to work okay, but when I have it open in VS 2010 on my machine, it won't always open the app when I hit the "Play" button.
If I hit the green play button I get a status in the bottom left-hand corner that says "Build started...." and then "Build Succeeded", but the program never opens - it just sits there.
This behaviour seems to occur on and off. Today it might be like that, and tomorrow and may run fine.
Any ideas?
Re: Project Wont Run When Pressing Play Button
Double check that the project starts at your main form. Go to (Project - Project Name Properties - Application) and look at the Startup Form: field.
Re: Project Wont Run When Pressing Play Button
Quote:
Originally Posted by
kaliman79912
Double check that the project starts at your main form. Go to (Project - Project Name Properties - Application) and look at the Startup Form: field.
Yup - it is. :(
Re: Project Wont Run When Pressing Play Button
Intermittent problems are interesting. I don't think this will make a difference, but you might try putting a breakpoint somewhere really early, such as the InitializeComponents line in the constructor of the startup form. It would be interesting to note whether or not execution even begins. You might try putting it earlier, such as on a global, static, or form-level variable that is initialized at declaration.
Re: Project Wont Run When Pressing Play Button
Quote:
Originally Posted by
Shaggy Hiker
Intermittent problems are interesting. I don't think this will make a difference, but you might try putting a breakpoint somewhere really early, such as the InitializeComponents line in the constructor of the startup form. It would be interesting to note whether or not execution even begins. You might try putting it earlier, such as on a global, static, or form-level variable that is initialized at declaration.
Will do. There's a little drop-down just to the right of the play button that says "DEBUG". The other option is "RELEASE". I'm assuming DEBUG is what I want? What if I go into "Configuration Manager"? Is there anything in there?
I'm new to .NET if you can't tell already hehe :rolleyes:
Re: Project Wont Run When Pressing Play Button
If I put code into the "Private Sub Main_Load...." window with a breakpoint, it errors out on my line of code - so it's getting there. It just never shows the darn window!!
Re: Project Wont Run When Pressing Play Button
Ok, here's a really off the wall suggestion: How many monitors do you have, and how many did the person you inherited this from have? I work on a system where I sometimes have one monitor and sometimes two. When I move from one to the other, sometimes a program runs on the missing second monitor, which makes it appear to not be running at all.
Another thing I have seen is a window pop up behind VS....where it can't be seen until VS is minimized.
So there are two trivial, and totally weird, things to consider. You might look at the Task Manager to see whether or not the program is running.
Re: Project Wont Run When Pressing Play Button
Another clue is the green play button. Once you press it it should turn gray and the blue (stop) box will activate. Does this happen?
Re: Project Wont Run When Pressing Play Button
The button just turns green and then back to grey. I think I fixed the issue though. I was doing a little Google research and some dude on some forum somewhere said remove the .sln file and open the project again.
Since I inherited the project from VS 08 and I have VS10, a conversion took place when I first opened the software. With that in mind I figured I'd give it a shot as perhaps something was screwed up during the conversion.
I created a copy of the folder where my project is located and deleted the .sln file. I then used the project file to open the software and it loaded. Now the screen loads and the entire program runs about 1000 times faster than it ever did. Normally I'd hit the play button and it would take 20 seconds to load. Now, it takes about 5.
In doing so, a new .sln file has been created - so I'm assuming all is well. I'll test more tomorrow.
Re: Project Wont Run When Pressing Play Button
Sounds like the sln file was referencing resources that had moved. It got to them, but only after trying a few dead leads first. Just a guess, though. Mark it resolved and move on to the next thing. There's always a next thing.