|Microsoft SQL Server|
- Package the source code
- Run the analysis
- Verify the analysis log
- Check if the warnings are due to missing libraries or source code. The .NET compiler used by the analyzer is resolving the references either from the external assemblies or from other projects that have been added in the source code. Unresolved references are creating alerts during source code delivery in DMT.
- Open Delivery manager tool and check if there are any alerts for missing source code, that were raised during packaging of .NET source code.
- For any alerts refer Delivery Manager Tool - Package - Validation - Alerts in order to resolve them.
- Check if the alert is coming for the project file which is physically not present in the source code.
Lets see an example: Below is the code snippet of Sherlock.application.module.csproj
From the above code snippet Sherlock.DataAccess.csproj is expected to be present in the folder Sherlock.DataAccess and this folder is expected to be present in the same folder structure where we have Sherlock.application.module folder.
- If the folder structure is not correct then the DMT discoverer would be unable to find the project file referred and an alert is raised. Hence if you are getting any alert in DMT for project file missing, you have to see the folder structure in the referred project file and the physical folder present in the source code.
- If there is a mismatch of the folder structure then you will encounter these warnings, which will further impact in the resolution of the objects and links.
- This is a source code issue, because when you compile the code in Visual Studio you should get compilation warnings. In this case the project file can be ignored.
- If you have resolved all alerts in DMT and warnings are still present
- Open the source code file that is referenced in the warning message and check the using list to identify the referenced object. For example for warning:
2018-08-13 22:13:55.445151 Warning MODULMSG ; Job execution C:\CASTMS\Deploy\website_with_dot\WEBSITE_CODE\Website.UI\PoleAvailabilityManager.cs(25,17): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
The referenced library in the source file is using Microsoft.VisualStudio.TestTools.UnitTesting
Search in KB to see if object has been analyzed from dll or from a project
WHERE fullname = 'Microsoft.VisualStudio.TestTools.UnitTesting'
- If the object is present in the source code then this can be an issue of missing dependency between the AU that contains the source code file or a case of missing external assembly if the object is created from an external library. In both cases you will have to check the CAST-MS configuration
- If the object is not present in the KB and since you had no alert in DMT, then the object must have not been analyzed. Open the analysis log and search for any references for the above object and for any warnings or errors go to the relevant pages in the troubleshooting guide.
- Check if the application is a Sliverlight framework application. Open the project file and check this string "<SilverlightApplication>true</SilverlightApplication>". If this string is present in the project file then the application is a Silverlight application. To package the Silverlight application we have to package separate set of Silverlight Microsoft assemblies to avoid these warnings.
- If the problem you are facing does not match any case listed in this page, contact CAST Technical Support with the Relevant Input to reproduce issue.