Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 crashes when trying to set CssClass property

Many times when I'm editing a .aspx file and type CssClass=, the Visual Studio IDE hangs then crashes with option to restart. Clearly this is happening while VS is trying to populate the Intellisense with available classes. Nine times out of ten I already know what class I want. Is there a way to disable Intellisense just on CSS classes? Or is there something else going on?

Specs: Windows 7 (basic theme, no Aero), Visual Studio 2010 Professional, Pentium 4 2.4 GHz, 2GB RAM

like image 941
Michael Itzoe Avatar asked Aug 19 '10 16:08

Michael Itzoe


2 Answers

Try "Enable Insert attibute value quotes when typing" on Tool -> Options -> TextEditor -> HTML -> Formatting

For me, it fixed the problem.

like image 62
david.sansay Avatar answered Sep 19 '22 17:09

david.sansay


I had a similar issue before and while it's hard to determine precisely what is triggering your crash, I would recommend a few possible solutions. Hopefully one of these will work for you.

  • Open Options->Text Editor->CSS->Miscellaneous and disable "Statement Completion"
  • Also in the General section there are other "Statement Completion" options.
  • Try closing the project, deleting the contents of the "bin" folder inside the Project folder (you might backup your project before), then re-open the project.
  • As a last resort you can try creating a new project and re-importing the project & code files, or even repairing/re-installing VS.

Best wishes, Matthew

like image 23
Chiramisu Avatar answered Sep 21 '22 17:09

Chiramisu