CMS Snapshot Analysis - Run Analyzer - DOTNet - Information - DOTNet analysis PackageReference not found by analyzer

Description

When your package .NET code with PackageReference tag in the project file you will not encounter any alert as DMT does not support PackageReference referred to in the project file.

But while running an analysis you may see missing assembly warnings in the analysis log:

 

Observed in CAST AIP
Release
Yes/No
8.3.x(tick)
Observed on RDBMS
RDBMS
Yes/No
CSS(tick)
Step by Step Scenario
  1. Packaged and delivered the source code.
  2. Ran the analysis and snapshot.
  3. Validated analysis log
Solution

When you are analyzing a .NET project having PackageReference included in the project file, these Package References are not picked by the analyzer.

When you deliver the application you may not get any alerts for these PackageReference (Nuget packages) because DMT does not handle PackageReference referred to in the project file but handles only the Reference referred to in the project file.

.NET analyzer from 1.1 and higher version supports  PackageReference 

They should be present with the sources as .nupkg files because the location of the sources is all the analyzer knows. When you do Nuget install commands it expands the package but it copies the .nupkg file in the package folder as well or you can manually copy and paste the packages in the deploy folder anywhere. The best would be to create a "packages" folder and keep all the .nupkg files inside it. When you run the analysis the analyzer will look for the referred PackageReference in the deploy folder tree.

While running the analysis the analyzer will unzip the .nupkg files in memory and use the assemblies to resolve the objects using it in the class files.

If you do not copy-paste the .nupkg files in the deploy folder you will end up with warnings like below:

When you copy-paste the .nupkg file in the deploy folder you would not get any warnings in the analysis log as shown below:

There was some issue in .NET analyzer which failed to pick the nupkg files from the deploy folder which is fixed in .NET 1.2.2 funcrel.

Impact on Analysis Results and Dashboard


Notes/comments


Related Pages