Last analysis failed: b02dd1ff-ed0c-4444-b75b-06a34459f281

The last analysis has failed. If it keeps on failing after several attempts, please contact us and provide the following failing analysis ID: b02dd1ff-ed0c-4444-b75b-06a34459f281.

Thanks in advance :slight_smile:

Hi @robgardnerpd,

Welcome to the Community!

I investigated the failure for analysis b02dd1ff-ed0c-4444-b75b-06a34459f281 on the develop branch and found the root cause.

The Autoscan .NET worker crashed during NuGet package resolution with the following error:

Invalid package id: 'Glass.Mapper.Sc.$(GlassVersion)'

One of your .csproj files references the Glass.Mapper Sitecore package using an MSBuild variable as the version: Glass.Mapper.Sc.$(GlassVersion). It seems $(GlassVersion) is defined somewhere (maybe in a Directory.Build.props or shared .props file) and resolved by MSBuild at build time.

Autoscan analyzes your code without running a full MSBuild pipeline, so it encounters the literal string $(GlassVersion) as a package ID, which is invalid. This causes the NuGet resolution step to throw a fatal exception and the analysis to abort.

Autoscan is designed for zero-configuration setup and runs without access to your full build environment. It cannot pre-resolve MSBuild property expressions inside NuGet references.

Since your project requires a full MSBuild context to resolve dependencies correctly, we recommend switching to CI-based analysis. This runs the scanner as part of your Azure DevOps pipeline, giving it full access to your build environment. MSBuild properties resolve as expected, and you would get the complete C# analysis results.

The setup guide for Azure DevOps is here:

Once configured, CI-based analysis will also give you pull request decoration directly in Azure DevOps.

Hope that helps.

Best regards,

Stevan