Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2005: Please stop opening my CS files in "Design Mode"!

I think it's associating my Web Service's CS files with the related ASMX files. But whatever's happening, I can't double-click to open the CS files - I have to "view Code" or it opens in the designer.

Anyone know how to turn off this automatic behavior? I just want to edit the code!

like image 977
Steve Eisner Avatar asked Sep 17 '08 02:09

Steve Eisner


2 Answers

Try right-clicking, select "Open with...", mark "CSharp Editor" and select "Set as Default".

That works for avoiding the WinForms Designer.

like image 152
Rasmus Faber Avatar answered Sep 21 '22 17:09

Rasmus Faber


I found this question when trying to deal with a similar problem. I had a C# class in a file and whenever I double clicked on the file it would try to open in design mode but design mode was meaningless for this class. I just want to see the code.

I found that adding the [System.ComponentModel.DesignerCategory("")] attribute to my class fixed this.

like image 32
Brian Ensink Avatar answered Sep 21 '22 17:09

Brian Ensink