Results 1 to 10 of 10

Thread: [RESOLVED] Project Wont Run When Pressing Play Button

  1. #1

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Resolved [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?

  2. #2
    PowerPoster kaliman79912's Avatar
    Join Date
    Jan 2009
    Location
    Ciudad Juarez, Chihuahua. Mexico
    Posts
    2,593

    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.
    More important than the will to succeed, is the will to prepare for success.

    Please rate the posts, your comments are the fuel to keep helping people

  3. #3

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Re: Project Wont Run When Pressing Play Button

    Quote Originally Posted by kaliman79912 View Post
    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.

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    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.
    My usual boring signature: Nothing

  5. #5

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Re: Project Wont Run When Pressing Play Button

    Quote Originally Posted by Shaggy Hiker View Post
    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

  6. #6

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    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!!

  7. #7
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    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.
    My usual boring signature: Nothing

  8. #8
    PowerPoster kaliman79912's Avatar
    Join Date
    Jan 2009
    Location
    Ciudad Juarez, Chihuahua. Mexico
    Posts
    2,593

    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?
    More important than the will to succeed, is the will to prepare for success.

    Please rate the posts, your comments are the fuel to keep helping people

  9. #9

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    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.

  10. #10
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    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.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width