public class MyShellTask : Process
{
...
}
One thing that bugged me to no end is that, in Visual Studio, when you double click the file in the Solution Explorer, it considered it "designable" even though there was no designer. So that means I got a empty page every time, telling me that it was not designable, with a link to "View Code". Well, "View Code" is what I wanted, not "View Designer", when I double-clicked!
So after getting very frustrated, I did the natural thing.. I googled looking for an answer. I had a notion that I could control this behaviour through Attribute tags on the class if only I knew the right one. Having made designable components before I was familiar with the attributes used for that. I tried fiddling about with Intellisense, Googling, all to no avail.. Nothing worked! Nothing showed up in my Google searches! Good God! What to do now?
Fiddle some more... until finally I found the right attribute:
[System.ComponentModel.DesignerCategory("")]
public class MyShellTask : Process
{
...
}
Note that you must call this with an empty string (don't believe the intellisense comment, an empty constructor call will NOT do the same as calling the constructor with an empty string.) This sets it to a non-category that it doesn't know how to deal with, and so doesn't offer designer support to you!
This also helps custom installer class for use with your Visual Studio Setup projects, which exhibit the same annoying VS UI problems... ie:
///
/// Custom Installer actions for this project.
///
[RunInstaller(true)]
[System.ComponentModel.DesignerCategory("")]
public partial class MyInstaller : Installer
{
...
}
Hope that helps someone! Now there will be at least ONE hit if someone googles up "disable design-time support" or "disable designer support" like I did!