The analysis of a C++ application using C Family extension fails from the beginning, with the following error in the analysis log file :

Some paths could not be substituted: `$(WINREGISTRY,"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual C++\ProductDir")\MFC\Include, $(WINREGISTRY,"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual C++\ProductDir")\Include'.

This error comes from a check done by the analyzer in the Windows registry before it starts working : if the Microsoft IDE required for analysis is not installed on the analysis machine, it will stop with this message. Refer  to C and C++ Required third-party software to learn more about the required IDE

Observed in CAST Extension



C and Cpp Analyzer 2.2 (tick)
C and Cpp Analyzer 2.1 (tick)
C and Cpp Analyzer 2.0 (tick)

Observed on RDBMS
Oracle Server(tick)
Microsoft SQL Server(tick)
Step by Step Scenario
  1. Discover the source and deliver
  2. Run the analysis
  3. See the Analysis log file
Action Plan

The issue is caused because there exists an Analysis Unit for the windows registry entry of the Visual Studio, selected in the AU configuration, is not found.

To troubleshoot the issue:

  1. Check if the Visual Studio version that has been set in the AU is installed in your analysis server

    1. Open the analysis log and check the configuration of all analysis unit for the IDE(s) used by every single one analysis unit. For example:


      IDE used for this Analysis Unit : VC++ 2006

      IDE used for this Analysis Unit : VC++ 2005 Console

    2. Verify that each version of Visual Studio version that is referenced is installed on the analysis server. This is a prerequisite if you intend to use the CAST - VC++ XXX - Mandatory Part Environment Profile, which is the recommended setting when you analyze source code that has been developed in Visual Studio IDE. 

      1. If you opt to not install Visual Studio on the analysis server(this will impact the results), select the following analysis options in the CAST Management Studio for the AU:

        IDE Options

        "IDE used for this Analysis Unit" is set to "Not Specified"
        "STL Support" is set to "Cast emulation

      2. If you opt to install Visual Studio verify that it corresponds to the one selected in the analysis unit configuration and rerun analysis. If the issue persists go to next step
  2. Check if the windows registry entry quoted in the error message exists on the analysis server 

    1. Retrieve the windows registry path from the error message in the analysis log file. For example:

      Some paths could not be substituted: 
      `$(WINREGISTRY,"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VC\ProductDir")\include, $(WINREGISTRY,"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VC\ProductDir")\atlmfc\include'. 

      The registry entry is related to the windows visual studio version that has been selected in the AU configuration according to Visual Studio Versions

    2. Open windows registry editor and verify that the referenced path exists on your local machine. For example: 
      1. If the path is not present, verify if you are using windows 32 or 64 bits
        1. If you are using 64-bit windows, then 
          1. Take a backup of the local database
          2. Run the following script on your local database, for example, named local_C:
            Update Reg Path on Local
            SET SEARCH_PATH TO local_C
               ATTR_VALUE_STRING like '%VisualStudio%'
    3. If the issue persists contact CAST Technical Support with the below relevant input.
Impact on Analysis Results and Dashboard

Impact of issue: Analysis will stop
Impact after applying solution: Analysis will run successfully

Relevant Input


Related Pages