N S

Novick Software Management • Design • Programming • Training • Consulting

   

 

 

Tips and Tricks for:  Visual Studio.Net, VB.Net, C#

The Problem:   Visual Studio 2003 sometimes won't design a Windows Form file.

Visual Studio sometimes gets confused about which files are Windows Forms (WinForms) and which ones are plain non-visual classes.  In the Solution Explorer you'll see the class icon instead of the form icon.  I've noticed this with Visual Basic.Net (VB.Net) projects but I've never seen it with C#, at least not yet.  I've experienced this most often when the WinForm in question inherits from a base form in another project.


Solution: Several actions may provide a solution. The last one is delete the \bin directories and rebuild.

Of course, you've tried a rebuild or you wouldn't have searched for this page.  And you've probably tried to restart Visual Studio and maybe even reboot.  All of these have fixed the problem for me at one time or another.

The two solutions that I have to add are:

  • If your WinForm inherits from another project, remove the reference to the other project and then restore the reference. 
  • Delete the contents of the \bin directory for your project and for all referenced projects in the solution.  Then rebuild.

This last one always works.


RSS as HTML

Personal Blog

 
New Tips:

Loading SQL Profiler trace (.trc) files with fn_trace_gettrace

Upcoming
Presentations:

Big Data:
Working with Terabytes
in SQL Server

July 9 '08


Full Schedule