0

For some reason I just started having an issue with my release builds.

I'm able to run any of my projects without issue from the debug builds, I can also run my release builds as long as I attach a debugger, but when I try to run the release builds on their own they either hang infinitely (The UI crashes, but I'm unable to stop the process with task manager), or they load up EXTREMELY slowly (I've only ever had them eventually load twice, and that was on a separate machine from my main PC).

I know I don't have any viruses or any other system issues (I take very good care of keeping my system extremely clean), and I've tried running the programs with AV disabled.

Nothing I do seems to make a difference, and the fact that debug builds of my projects perform exactly as expected leads me to believe somehow I've altered a setting in VS regarding how it builds releases or something similar.

Could this be the case? If so, how should I go about fixing it?

If you need any more information please let me know.


EDIT: Something else I've just noticed about this issue is, the only time I'm able to run any of the executables I've built is if they are in the bin\debug\ folder of my project. That includes copying the "release" build of my project into the debug folder. It then runs just fine. I've also tried building an installer for my project, and it also will only run while in the debug folder, and nowhere else on my system. Doesn't seem to matter whether it's a release or debug build, as long as it's in that folder.

Patrick
  • 430
  • 6
  • 21
  • This is one of those wonky things that's often hard to pin down. If you haven't already, clean your solution, exit VS, make sure your project build directories are completely empty, clear them out if not, purge \Users\username\AppData\Local\Temp, restart VS, and rebuild the project. It's a bit of a shot in the dark, but otherwise, I'm not sure if this has an formulaic answer. – jonsca Dec 29 '15 at 00:41
  • (all of the above probably sounds trivial, but all it takes is one corrupted file from a prior build step to gum up the works) – jonsca Dec 29 '15 at 00:50
  • Unfortunately, no such luck after following those steps. Any other suggestions? It sucks, because this has essentially turned VS into a virtual paperweight for me, along with all of my current projects... I even started a new blank project with nothing but a label that said "HELLO!", and got the same problem. Debug build works, release doesn't. – Patrick Dec 29 '15 at 01:35
  • I should also add: For whatever reason release builds absolutely won't start on my computer, but if I copy them to my girlfriends laptop they will eventually run (between 3-5 minutes after clicking on the file). – Patrick Dec 29 '15 at 01:37
  • This may be the key: http://stackoverflow.com/questions/368384/when-release-dlls-dont-work-but-debug-dlls-do. Your initial inclination of it being a build setting is probably correct. – jonsca Dec 29 '15 at 01:43
  • I read through all the suggestions on there, and the only ones that weren't mainly code-dependent (not an issue in my case) involved the project being built for 32 or 64bit. I've triple checked those settings for my project and they are set to the default of `Any CPU`, debug mode was set to `Any CPU` but `prefer 32-bit`, so I tried unchecking `prefer 32-bit` and still have the same issue after rebuilding my solution. – Patrick Dec 29 '15 at 01:58
  • I'm at a loss, unfortunately :\ Next steps would likely be uninstalling/reinstalling VS and checking to see whether a .NET update went awry, etc. I wish I could help further. – jonsca Dec 29 '15 at 02:00
  • Thanks for trying! Reinstalling VS was my next step, but I'm weary that won't even work. Hopefully someone else will notice this that may have had the same issue in the past and found a solution. I guess for now I'll need to rely on using my debug builds. – Patrick Dec 29 '15 at 02:11

1 Answers1

0

I ended up doing a complete uninstall of Visual Studio Community 2015 and all of the runtimes/etc. that were installed on the same date as VS, and reinstalled the program.

I then deleted all of the debug/release builds for my project, cleaned the solution and rebuilt them.

So far everything seems to be working okay now.

I'm not sure what the issue was, but a fresh install seemed to fix it.

Patrick
  • 430
  • 6
  • 21