Problem Description

While running the .NET analysis you may get the below type of warnings in your analysis log:

2020-03-05 09:35:24.697112    Warning    MODULMSG ; Job execution    DOTNET.0156: An unexpected exception occurred while loading project D:\CASTFiles\CastSource\Test_code\test.csproj. Project excluded from the analysis.

 2020-03-05 09:35:24.697112    Information    MODULMSG ; Job execution    System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\CAST%20Files\Misc\Plugins%20&%20Extensions\com.castsoftware.dotnet.1.2.4-build11002577\third_parties\microsoft.netcore.app.ref.3.1.0'.
  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.FileSystemEnumerableIterator`1.CommonInit()
  at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
  at System.IO.DirectoryInfo.EnumerateFiles(String searchPattern, SearchOption searchOption)
  at Roslyn.DotNet.ProjectBuilders.FrameworkInfo.GetAssembliesName(String path)
  at Roslyn.DotNet.ProjectBuilders.FrameworkInfo.HasAssembly(String asmName)
  at Roslyn.DotNet.Extractions.ExtractionManager.ReadManifest(FileInfo fwe, Stream manifest, ZipArchive archive)
  at Roslyn.DotNet.Extractions.ExtractionManager.OpenExtraction(FileInfo fwe)
  at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
  at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
  at Roslyn.DotNet.Extractions.ExtractionManager.Init()
  at Roslyn.DotNet.Extractions.ExtractionManager.SelectPackage(String name, FrameworkKind kind, Version ver)
  at Roslyn.DotNet.ProjectBuilders.RawProjectBuilder.AddProjectToSolution(Solution& solution, DotNetProject projectDesc, List`1 loadedProjects)
  at Roslyn.DotNet.ProjectBuilders.WorkspaceBuilder.LoadAtSolutionLevel(Solution& solution, IEnumerable`1 projectsToLoad, List`1 loadedProjects)

Observed in CAST Extension Version


Release

Yes/No

1.2(tick) 
Observed in RDBMS

RDBMS

Yes/No

CSS3 (tick) 
CSS2 (tick) 
Step by Step Scenario
  1. Package the source code
  2. Run the analysis
Action Plan

Perform the below actions

  1. Check in the analysis log for the warnings.

  2. You need to run the analysis in debug mode to get the stack trace in the analysis.
  3. If the path of Dotnet extension has "spaces" in-between, like "D:\CAST Files\Misc\Plugins & Extensions" then the analyzer throw this warning with an exception.
  4. You need to make sure to remove the spaces from the extension path and also update the same in castglobalsettings.ini file and save the file.
  5. Run the analysis.
  6. Even after removing the spaces from the extension path, if you are getting the warnings,  then contact CAST Technical Support. with the following Relevant Input for the reproduction of the issue
Notes/comments


Related Pages