This page explains the fatal error while running the analysis and its impact.
You can find the following fatal error in your analysis log file for the corresponding analysis unit.
2016-05-19 15:30:41.754 InformationMODULMSG ; Job executionStarting analysis of C:\CASTMS\Deploy\Source Code\Source Code\File.Website\File.Website.csproj (1 / 1)0; DOTNET
2016-05-19 15:30:43.189 FataLerrorMODULMSG ; Job executionMissing mandatory reference towards mscorlib: project C:\CASTMS\Deploy\Source Code\Source Code\File.Website\File.Website.csproj will be skipped0 ; 00 0DOTNET
As you can see from the fatal error that the analysis of project File.Website.csproj is being skipped, so you will not find any corresponding objects created in your knowledge base.
Release | Yes/No |
---|---|
1.0 |
RDBMS | Yes/No |
---|---|
Oracle Server | |
Microsoft SQL Server | |
CSS3 | |
CSS2 |
Below is the step-by-step scenario leading to the problem:
- Package and deliver .Net application (either C# or VB)
- Accept and set as current version from CAST MS.
- Run analysis.
- Analysis stops with fatal error seen in the Analysis Log.
Search in analysis log for the Project Path corresponding to the Fatal error message. For example in the below analysis log :
2016-05-19 15:30:41.754 Information MODULMSG ; Job execution Starting analysis of C:\CASTMS\Deploy\Source Code\Source Code\File.Website\File.Website.csproj (1 / 1) 2016-05-19 15:30:43.189 Fatal Error MODULMSG ; Job execution Missing mandatory reference towards mscorlib: project C:\CASTMS\Deploy\Source Code\Source Code\File.Website\File.Website.csproj will be skipped
the project path is C:\CASTMS\Deploy\Source Code\Source Code\File.Website\File.Website.csproj
Search for an information message of Project Path (as shown below) in analysis log when you browse the analysis log messages from bottom to top:
2016-05-19 15:30:29.906993 Information MODULMSG ; Job execution Project Path C:\CASTMS\Deploy\Source Code\Source Code\File.Website\File.Website.csproj
If the above information message exists, the project belongs to an analysis unit automatically created by CAST MS due to a project discovered by the CAST Delivery Manager Tool. If no information message exists, then the Analysis Unit has been manually defined. For more info on Analysis Units creation see CMS - Analysis Unit editor. in CAST-MS open the Analysis Unit Editor->Analysis tab->Referenced Assemblies and check if mscorlib.dll library is in the list of referenced assemblies.
- If mscorlib.dll library is not in the list of referenced assemblies then:
- If this is a user defined analysis unit, then you should manually add the .NET assemblies in the Analysis tab Referenced Assemblies as described in CMS - .NET Technology options
- If this is an automatically created analysis unit, go to Delivery tab->‘Manage the delivery’ for the Current Version. Check in .NET source packages for any missing library alerts concerning mscorlib.dll.
- If such alerts exist, check if a package of type ‘.NET framework (system assemblies)’ as described in page has been correctly added.
- If there is no such package then you should create a new package, add a package with the .NET assemblies. You can find more info on how to do this in this page
- If there already exists such a package then you should check whether mscorlib.dll has been discovered in this package
- If mscorlib.dll is missing, then the .NET assembly has not been correctly added. If you have followed all the steps described in this page, then contact CAST Technical Support. with the following Relevant input
- If mscorlib.dll is not missing in the .NET assembly package, then you should check the alerts of the other .NET packages for missing library files concerning mscorlib.dll file. It can be the case that the version of mscorlib.dll assembly missing is not the standard one provided by .NET framework, for instance it could be the Silverlight version of this dll. In this case you should treat the issue as a standard DMT alert issue, which means that it can be re mediated by:
- Either creating an additional package with the requested assembly as described in DMT - Package Content tab - Packaging alerts
- Either creating a manual rule to replace the requested assembly with the standard one as described in DMT - Package Configuration tab - Any change to apply once the code is extracted. For example, in the case of missing Silverlight version of mscorlib.dll such a rule can be seen below:
If no alert exists, then contact CAST Technical Support. with the following Relevant Input
- If such alerts exist, check if a package of type ‘.NET framework (system assemblies)’ as described in page has been correctly added.
If mscorlib.dll library is in the list of referenced assemblies then it could be the case that the referenced paths are not correct which generally occurs during the change of deploy folder path post Migration, adding other version or change of deploy folder path in CAST-MS preferences file.
The below solution (fixed in 8.2.5) is applicable when you deploy the packages by setting it as current version, the .net framework assembly package path does not change and remains the old one.This procedure has to be done for each 'set as current version'
Deploy sources and set as current version
Quit CAST-MS
Run a SQL session. Configure and execute the below query where:
<XXX_MNGT> is the management schema name
<ORIGINAL_PATH> is the path which has to be changed
<NEW_PATH> is the new path
Ensure the 2 paths are ending with '\' (folder separator) to avoid having issues with substring folder namesupdate <XXX_MNGT>.cms_net_assembly_file set assemblypath = replace(assemblypath, '<ORIGINAL_PATH>', '<NEW_PATH>') For example: update test_Dotnet_810_mngt.cms_net_assembly_file set assemblypath = replace(assemblypath, 'S:\SOURCES\DotNet\ANALYZED\MYAPP\V1\Ms_Fw_dll\', 'S:\SOURCES\DotNet\ANALYZED\MYAPP\V2\Ms_Fw_dll\')
Open CAST-MS and run the analysis
- If mscorlib.dll library is not in the list of referenced assemblies then:
If you do not find the information you are looking for or solution for your problem, in this page, contact CAST Technical Support with the following Relevant input for reproduction of the issue