I just recently hard reset my computer and ever since then, I can’t seem to get my game to run in Visual studio. I reinstalled all the necessary components, yet for some reason, my code never gets past the new Game1()
I put some WriteLine statements to see what was happening and it looks like the code never even creates a Game1().
I just searched my hard drive for Eysandia.exe and ran it, it opened up like normal and then when I went to run it in Visual Studio it ran like normal immediately. Great! However, as soon as I make a change to any file and try to run it, it takes a couple of minutes to open!
So it seems like my problem was not that it wasn’t running but instead that it was taking minutes to start the application.
Is there any reason why Visual studio would take so long to run the program?
I am experiencing performance issues on my 8Mb home PC with Visual Studio 2019 whereas I have none on my work PC (16Mb). It can take a while to Load projects, build and begin debug.
Some things to try:
[Try a bare bones monogame project to see if that takes a long time.
Look in the output tab in Visual Studio to see what it is doing (Menus: View → Output)]
EDIT: I see you did these two above already.
Look in Visual Studio extensions to see if there is anything there that might be slowing it down.
Try your project on a different version of Visual Studio perhaps.
I have only the necessary extensions for monogame. I updated Visual Studio and the program ran immediately after pressing play and kept working until I made any change to the code and saved, then it took a consistent 40 seconds to run every time, even after restarting my computer.
Interestingly after updating Windows, the same thing happened again, it would open up instantly again and again until I made any change to the code and saved. Now it takes 40 seconds to run every time no matter what I do. It’s not even loading content during this time. What is going on?!
EDIT: So weird how it takes excactly 40 seconds every time, regardless of what I’m running in the background. I also have a pretty powerful pc and this same issue occurs with a new project, still 40 seconds on the dot.
This behavior is very strange, after updating windows thing went great, even after changing code. It worked great for days. However, after changing a static variable in one of my classes the behavior returned and it would take 40 seconds to launch. I updated visual studio and it fixed the problem until I changed some arbitrary piece of code, then it stopped working. This has happened multiple times now, when it breaks, I update windows or VS and it fixes itself (until it breaks again). If there are no update available there is nothing I can do, restarting my computer does nothing.