📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

Your custom analyser works in Rider for one developer but does nothing for another on an older SDK. Why, and how do you fix it?

Mid-Level Coding Intermediate

🎯 Key points

  • Analyser references a newer Roslyn than the host compiler provides
  • CS8032: analyser cannot be created; it is skipped and no diagnostics appear
  • Pin Microsoft.CodeAnalysis to the oldest supported compiler version
  • Pin the SDK with global.json and align IDE versions across the team
  • CI check that a known-bad sample produces the diagnostic

⏱ 30-second answer

The analyser was compiled against a newer Microsoft.CodeAnalysis than the Roslyn compiler in the older SDK or IDE. The host can't load it, reports CS8032 ('an instance of analyser cannot be created') in the build output, and then silently skips it, so in the IDE it simply looks like the rule never fires. Fix: pin the Microsoft.CodeAnalysis.CSharp reference to the oldest compiler version the team supports, pin the SDK for everyone with global.json, check that IDE versions match, and add a CI test that a known-bad sample actually produces the diagnostic, so a non-loading analyser fails the build instead of passing quietly.

🔍 What the interviewer is checking

Checks understanding of analyser loading and compiler version compatibility

↩ Usually asked after

More in Static Analysis

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me