BUG: Error in Upgraded Visual J++ Project that Uses the Chart Control (325751)



The information in this article applies to:

  • Microsoft Visual J# .NET (2002)

This article was previously published under Q325751

SYMPTOMS

When you build an application that uses the Microsoft Chart Control (MSChrt20.ocx) and that was upgraded to Visual J# .NET by using the Visual J# Upgrade Wizard, you receive the following compiler error message:
Internal Compiler Error: jclass_decl.cpp(486)

CAUSE

The DLL that TlbImp generates during the upgrade with the wizard does not have a constructor, so the compiler assert is generated.

RESOLUTION

To work around this problem, do not rely on the TlbImp DLLs that the wizard generates. Instead, add a reference for MSChart20.ocx to your project manually. You can do this in two ways:
  • After the upgrade completes, remove any of the following assemblies from the reference list, and then add the reference to the Microsoft Chart Control 6.0 (MSChart20.ocx) manually by using the COM tab in the Add Reference dialog box:
    • MSChart20Lib
    • MSCOmctlLib
    • MSDATASRC
    • stdole
  • On the first page of the wizard, click Finish to skip the upgrade step, and then manually add a reference to Vjswfc.dll and MSChart20.ocx by using the Add Reference dialog box.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Create a Windows Foundation Classes (WFC) application in Microsoft Visual J++ 6.0.
  2. Drag a Microsoft Chart Control object onto the form.
  3. Open the Visual J++ 6.0 project in Microsoft Visual Studio .NET to start the upgrade wizard.
  4. On page 3 of the Visual J# Upgrade Wizard, add a reference to MSChrt20.ocx.
  5. Complete the upgrade and build the solution.

Modification Type:MajorLast Reviewed:1/28/2004
Keywords:kbbug KB325751