You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
error CS8032: An instance of analyzer Microsoft.NetCore.CSharp.Analyzers.Usage.CSharpMissingShebangInFileBasedProgram cannot be created #128905
I saw this build break in multiple PRs, filing as a normal issue since known-issue workflow doesn't work for build breaks.
##[error]CSC(0,0): error CS8032: (NETCORE_ENGINEERING_TELEMETRY=Build) An instance of analyzer Microsoft.NetCore.CSharp.Analyzers.Usage.CSharpMissingShebangInFileBasedProgram cannot be created from /Users/runner/work/1/s/.packages/microsoft.codeanalysis.netanalyzers/11.0.100-preview.5.26257.113/analyzers/dotnet/cs/Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll : System.TypeLoadException: Could not load type 'Microsoft.NetCore.Analyzers.Usage.MissingShebangInFileBasedProgram' from assembly 'Microsoft.CodeAnalysis.NetAnalyzers, Version=11.0.100.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
CSC : error CS8032: An instance of analyzer Microsoft.NetCore.CSharp.Analyzers.Usage.CSharpMissingShebangInFileBasedProgram cannot be created from /Users/runner/work/1/s/.packages/microsoft.codeanalysis.netanalyzers/11.0.100-preview.5.26257.113/analyzers/dotnet/cs/Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll : System.TypeLoadException: Could not load type 'Microsoft.NetCore.Analyzers.Usage.MissingShebangInFileBasedProgram' from assembly 'Microsoft.CodeAnalysis.NetAnalyzers, Version=11.0.100.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. [/Users/runner/work/1/s/src/tools/illink/src/ILLink.RoslynAnalyzer/ILLink.RoslynAnalyzer.csproj]
DO NOT USE JSON BELOW IF THIS IS A BUILD BREAK otherwise build analysis will allow pull requests to merge that break the build worse. For a build break, do not use this issue form. Make a regular new issue.
This is same as #128372. The fix is elsewhere, we should hopefully get it once we get updated dotnet/dotnet flow, we haven't had a successful flow for a week. Not sure if it's worth keeping the issue open since build analysis doesn't pick this up anyway.
Activity
dotnet-policy-service commentedon Jun 2, 2026
Tagging subscribers to this area: @agocke, @dotnet/illink
See info in area-owners.md if you want to be subscribed.
MichalStrehovsky commentedon Jun 2, 2026
This is same as #128372. The fix is elsewhere, we should hopefully get it once we get updated dotnet/dotnet flow, we haven't had a successful flow for a week. Not sure if it's worth keeping the issue open since build analysis doesn't pick this up anyway.