Excerpt - Some paths could not be substituted - All

Observed on RDBMS

RDBMSYes/No
Oracle Server
Microsoft SQL Server
CSS3
CSS2
CSS1

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

      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](https://en.wikipedia.org/wiki/Microsoft_Visual_Studio#History)
   2. Open [windows registry editor](https://support.microsoft.com/en-au/help/4027573/windows-10-open-registry-editor) and verify that the referenced path exists on your local machine. For example:
   3. ![](https://doc-data.castsoftware.com/TG/attachments/566533218/566533217.png)
      1. If the path is not present, [verify if you are using windows 32 or 64 bits](https://www.howtogeek.com/howto/21726/how-do-i-know-if-im-running-32-bit-or-64-bit-windows-answers/)
         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:

               ```java
SET SEARCH_PATH TO local_C
UPDATE 
   DEFANA_ENTITYATTR
SET 
   ATTR_VALUE_STRING = REPLACE(ATTR_VALUE_STRING,'SOFTWARE\Microsoft\','SOFTWARE\WOW6432Node\Microsoft\')
WHERE 
   ATTR_VALUE_STRING like '%VisualStudio%'
  1. 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