Page tree
Skip to end of metadata
Go to start of metadata
Purpose (problem description)

This page gives the approach to solve the following error message: ' error BC30002 : Type 'XXX.YYY.ZZZ' is not defined

This error occurs for three main reasons.

  1. In 8.0.0 and 8.0.1 only, the Roslyn.dll assembly included in CAST AIP folder is not up-to-date.
  2. The assembly defining type XXX.YYY.ZZZ is referenced in a .NET project file as a COM Reference, which is not supported.
  3. The assembly defining the type is not found or is found several times and creating duplicate in the delivery, leading to ambiguity.
Observed in CAST AIP
Release
Yes/No
8.3.x(tick)
8.2.x(tick) 
8.1.x(tick)
8.0.x(tick) 
7.3.x(tick)
Observed on RDBMS
RDBMS
Yes/No
Oracle Server(tick)
Microsoft SQL Server(tick)
CSS3(error)
CSS2(tick)

Action Plan

You need the following Relevant input for troubleshooting.

Perform the below actions:

  1. If your version of CAST-AIP is 8.0.0 or 8.0.1, you may update to version 8.0.2. Otherwise, please ask  CAST Technical Support.for the updated Roslyn.dll file and replace the one in your CAST installation folder by the provided one.
  2. If your version is not 8.0.0 nor 8.0.1, or if issue is still there, then identify the assembly which contains object XXX.YYY.ZZZ. You may check this on the World Wide Web for Third-Party assemblies.
  3. Identify which project file the analyzer was parsing when the error message was logged.
  4. Check the reference to the assembly : open the project file and look for the name of the assembly.
    1. If the project file is a VB one and the reference is a COM Reference, it is not supported by CAST.
    2. If the reference is not a COM Reference :
      1. Check if the assembly is present in the folder where it is expected.
      2. Check if the assembly is present in the delivery.
  5. Check the packaging of the assembly, you could take the help of this Tools - DotNET - DotNET analysis checklist for troubleshooting any crashes

If issue is still there, then please contact CAST Technical Support


Relevant input

Access to customer analysis machine OR Source code

If none of the previous is possible, ask for CAST Support Tool (CST) - alias Sherlock

Identify which project file the analyzer was parsing when the error message was logged

Open the analysis log file, spot the error and scroll up until you encounter the following information message : "Starting analysis of XXX.vbproj"

The analyzer was processing file XXX.vbproj when it encountered the error.

Check the reference to the assembly

 Once you know the name of the project file, open it and search for the name of the assembly containing the object.

  1. If the file is a VB project file, first check that the reference is not a COM Reference. If it is, the assembly will not be taken into consideration, it is a known limitation of the VB analyzer.



  2. If it is not a COM Reference, then check the contents of the <Reference> markup. There might be a <HintPath> markup inside. The path contained in the <HintPath> is the folder where the assembly is expected. The assembly MUST be located in this folder, this is absolutely compulsory. If it is not, search for it in in the delivery.
    1. If the assembly is present in the delivery, move it to the folder specified inside the <HintPath> markup. In the following screenshot, the folder is the DLLFiles subfolder of the folder containing the vbproj file.
    2. If it is not present in the delivery, ask the development team to check their delivery for missing files.




  3. If there is no <HintPath>, then the assembly must be part of a resource package. You have to check the packaging of the assembly.

 Check the packaging of the assembly

For general instructions about packaging a .NET application, please refer to the following documentation :

  1.  First check that the assembly is present on the computer. If it is not, ask the development team if it is a Third-Party assembly. Ask the system team if it is a .Net Framework assembly.

  2. In Cast-MS, open the Delivery Management Tool by clicking "Add version". In DMT, check that a resource package exists, containing the assembly (you can see it in the "package content" tab) . If not, create it. Re-package the resource package.

  3. Open the source package containing the project file. Go to the "package content" tab and check the packaging alerts.

  4. If there is a "missing library" packaging alert about the assembly
    1. Right-click on it and choose "Add remediation".
    2. Select the assembly from the resource package (you have just checked it was present, possibly added it, and repackaged the resource package, so it MUST be there).
    3. Re-package the source package. The packaging alert must have disappeared. Deliver.

  5. If there is no "missing library" packaging alert about the assembly, you have to check for duplicates :
    1. If the assembly is a member of the resource package, you have to check that is not also included as a source file in one of the source packages. If it is, exclude it from the source package, repackage the source package and deliver.
    2. If the assembly is not a member of the resource package, you have to check that, ONLY ONE COPY is included in one of the source packages. If there are duplicates, then keep the one with the <HintPath>  markup inside and exclude the others from the packages they belong to. Re-package the application and deliver.

Notes/Comments

First case (Roslyn.dll assembly included in CAST AIP 8.0.1 folder is not up-to-date) was seen in ticket #5629

Second case (COM Reference) was seen in ticket #5868

Third case (wrong packaging) was seen in tickets #5554 and #5533

  • No labels