Microsoft Visual Studio«

  • Product Name        Visual Studio Enterprise Edition
  • Version Number     6.0
  • Operating System   Windows NT 4.0 (sp6)
  • Email Address       
  • Link to the manufactures web site.

Bug#1 Class Wizard

Bug#2 Class View

Bug#3 Class Wizard

Some possible Work-Around's for Bugs #1,2,3

NEW Service Pack 5 for Visual Studio is now available

Service Pack 4 for Visual Studio is now available

Perhaps SP4 will fix some of these Class Wizard bugs !



Class Wizard 

Reusing code is a feature I like. If I have a class that I need to reuse, I can insert it into a project, this can be done with a  minimum of effort.

The bug happens about 5 out of 10 times, and then there seems to be no fix for it.

If I copy the .cpp and .h files into the project folder, then use the menu items Project/Add to Project/Files and select the cpp and h files they are inserted into project. 

However the Class Wizard does not update it's database information, this has been a "feature" ( I'm not sure if it's a bug) for several versions, and the simple work-around is as follows:-

  • Save the current project, and close it.
  • Delete the <project name>.clw file.
  • Open the project and press Ctrl+W for enable the Class Wizard. As the .clw file no longer exists, the Class Wizard will offer a menu allowing you to add all files and it will then rebuild the .clw database file.

As I said this works 5 out of 10 times. You will know when it's about to fail, as the following message appears ( fig 1)

ClassWizard_fig1.gif (13026 bytes)

The class "CListManager" uses a file named ListManager.cpp and ListManager.h, both file were added to the project without error, so why do I get this message.

I tried to add these two files again, and here is the message that appears ( fig 2)

ClassWizard_fig2.gif (12595 bytes)

Well if it's already in the project, why does it refuse to use it ?

In the Class View I have full access to CListManager as you can see in (fig 3)

ClassWizard_fig3.gif (9190 bytes)The Class View

March 16, 2001  Solution:- Install SP5 or SP6

I know of no way to make the Class Wizard accept these two files.

I have searched the Microsoft Knowledge Base (KB) and I cannot find an answer. The KB is so large, and if you do not know the key word it can take hours to find a solution or find nothing.


Top Of Page

Bug #2  

Class View  ( May be part of Class Wizard, I don't care as long as it works ! )

This is a different bug, and may be related to Bug#1. Sometimes when adding a class using Class Wizard, one or other class ( it appears to be random  !)  may disappear from the Class View ( fig 3 ).

Deleting the <class name>.clw file and rebuilding does not solve this problem.

Work-around: This works 50% of the time.  (March 16, 2001  Solution:- Install SP5 or SP6)

  1. Save the the WorkSpace.
  2. Close The WorkSpace.
  3. Rename or remove to another folder the <class name>.ncb file.
  4. Open the WorkSpace and the Class View gets rebuilt..

If this does not make the class reappear in the Class View, then there is little hope of ever seeing the class again!

From then on you will have to manage the class by opening files and editing it the old fashioned way.

As no other solution has been offered by Microsoft, I have to assume Microsoft considers this bug acceptable.


FYI Microsoft is already working on a new version of Visual Studio ! What can we expect ? more bugs ?

Link to Microsoft's Page about the new Visual Studio

Visual Studio 6.0 needs to be fixed first. We paid money for it and it does not work.......!

Update ! since the release of SP5 and now (March 16, 2001) SP6 it appears Microsoft is making an effort to fix these and other bugs.

Who knows may be it's the pressure of a falling stock price, or may be it's "real service" ! whatever it is, it was a long time coming.

On an average day, I can Save/Close the Workspace and rename the .cls and ,ncb files 10-20 times.

The idea behind the Visual Studio IDE was to save time.... After SP5 it would appear the IDE is saving me time !

March 16, 2001  Solution:- Install SP5 or SP6


Class Wizard 

During the attempt to fix Bug#1 or #2 when Class Wizard give the choice to "Add" a file or "Add All"

I tried adding files on an individual basis, in the hope that it may be a solution. The message I get when trying to add individual files is shown in fig 4.

CWizard_fig4.gif (15292 bytes)The error message after clicking "Add"

If I click the "Add All" there is no error message ! That's strange, if it can't add the individual file, then that same file has to be included by definition when the "Add All" button is clicked ! Yet it does not generate an error !

March 16, 2001  Solution:- Install SP5 or SP6

If you have a solution please send  it to

Possible work-around for Bug#1,2,3

These suggestion are all well and fine, but disabling some of these features, partially negates some of the reasons for spending the money on Visual Studio 6.0. Disabling Wizard Bar, means a loss of productivity, disabling IntelliSense in effect makes VS 6,0 the same as Version 5.0 ! ( One step forward and three steps back )

Some advice I received from Microsoft.

Its possible that for some reason the files are getting corrupted. Every time you add a variable, class, etc. the ncb file gets updated. The WizardBar also uses the ncb file besides ClassView.

Here are some suggestions:

  • Run scandisk/chkdsk
  • Temporarily disable antivirus and any other back ground programs
  • Remove programs from the startup group, logout and login again
  • Search for ncb and opt files in all the project directories that are a part of your workspace, rename/delete them.
  • Disable WizardBar, quit from VC++ and restart VC++
  • Replace mfcatl.ncb, crt.ncb and win32.ncb files that VC++ installs
  • Disable IntelliSense by selecting Options from the Tools menu. On the Editor tab, clear all checkboxes in the "Statement completion options" group. This feature relies on the ncb files. See Q153284 INFO: Limitations of IntelliSense in Visual C++ 6.0.

KB Articles

  • Q153284 INFO: Limitations of IntelliSense in Visual C++ 6.0
  • Q190968 BUG: IntelliSense limitations with C++ Classes
  • Q190965 PRB: IntelliSense Limitations with #define Macros
  • Q190966 BUG: IntelliSense Limitations with Templates
  • Q190974 PRB: Function Prototypes Do Not Generate Parameter Info
  • Q190975 BUG: Deleting Files from a Project Does Not Update IntelliSense
  • Q190976 PRB: IntelliSense Ignores Unicode/ANSI Versions of the Win32 API
  • Q190973 PRB: IntelliSense Does Not Display Enumerated Elements


March 16, 2001  Solution:- Install SP5 or SP6

I'm just as pissed off as you are at all the bugs, they drive me nuts on a daily basis as well.

One thing I do that seems to avoid most problems with classwizard being able to browse and display classes. Whenever I want to add a file into my project I:

  1. I actually open the files I want to add using File Open or double clicking in Explorer
  2. For each file I click on the little "Compile" button and compile it.   You'll get a pop up dialog box saying: "This file is not part of the current project, do you wish to add it?"
  3. Hit YES

Doing it this way seems to let class wizard go through all the proper steps and register it correctly.

Note: Do the same thing for H files, you will get an additional dialog warning stating that VS can't find the associated tool to compile it, but by the time you get this message, the file has already been registered and added. Most of all, you didn't really want to compile a H file anyways, so who cares, the goal was adding it to the project.

Finally, this technique also works with Dialog classes if you copy the dialog resource into your rc file using the resource wizard then double-click on the dialog itself inside the editor. It posts a similar warning asking you if you want to include the class. Clicking <YES> get's it registered properly almost every time. Please keep the heat on. Us little guys don't stand a chance against MS, but at least we can all feel better by yelling about it.

regards, Phil

Thanks for the tip

March 16, 2001  Solution:- Install SP5 or SP6


Top Of Page

Visit my web site Hans Wedemeyer's Projects, Code and More

Hit Counter

Copyrightę 2000 Hans Wedemeyer, Houston, Texas, U.S.A. All Rights Reserved.