• 0

Visual Studio stuck in Build Mode


Question

I have been having a bad VS day today, and this includes my latest problem:

I was working on a project and then went to rebuild it. I then started to edit a file and it said "Cannot currently modify this text in the editor. It is read-only." I noticed that it was still building, even though it didn't have any indication (No output window text, no "Build started..." at the bottom, etc.) except for the little animated icon. I tried to cancel the build using Build -> Cancel Build but it didn't work. I tried closing Visual Studio, but it froze and then a little while later popped up a message that said I had to wait for the build to finish in order to close the solution. I then went into task manager (the build had been running for a good 2-and-a-half to 3 minutes now) and terminated "devenv.exe". I started it back up and edited the code. I tried to build it, and it froze again. Now I shut down my computer thinking, "Oh, its just something stuck in RAM. It'll clear it when I reboot." I was wrong. Still the same problem. I tried moving the code files (and code files alone) into another folder and making a new project. It built fine once and ran fine once, and now the new project has the same symptoms!

Another little symptom I thought I'd mention is that now the cursor blinky-thing in the text editor is stuck, and only stays solid. Grrrr. Anybody got any ideas to fix this (these, if you count the cursor) problems?

Link to comment
https://www.neowin.net/forum/topic/902126-visual-studio-stuck-in-build-mode/
Share on other sites

4 answers to this question

Recommended Posts

  • 0

OK. This is interesting. I just found out why it got stuck:

I had made an owner-draw text box the way that I saw here, by overriding WndProc(). When I loaded the designer, it was calling this new method, and for some reason not handling the paint right. This made the WndProc() procedure somewhat freeze, or not do anything, thus freezing the build. I ended the devenv.exe process and restarted it, then deleted the text box from the form, and rebuilt it. It worked fine! So now I am using the method found here, by using SetStyle(ControlStyles.OwnerDraw, True). The only problem is that when I edit the text in the control, it draws text in the FixedSys font (or something similar) on a white background, and then when I exit the control it does the normal drawing, however the caret does not line up. I have attached a short video showing the behavior. So my question now is: How can I override the text drawing so that it doesn't look like this while editing?

Video:

ownerdrawtextbox.movFetching info...

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.