Skip to content

error CS8032: An instance of analyzer Microsoft.NetCore.CSharp.Analyzers.Usage.CSharpMissingShebangInFileBasedProgram cannot be created #128905

Closed

Description

@EgorBo

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]

Example: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1445486&view=logs&j=2710d842-fa61-5104-0e86-cc29dd313ead&t=0b292913-8361-5e62-8106-16cdc9499d26

Known Issue Error Message

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.

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0

Activity

  1. added
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    on Jun 2, 2026
  2. dotnet-policy-service commented on Jun 2, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @agocke, @dotnet/illink
    See info in area-owners.md if you want to be subscribed.

  3. MichalStrehovsky commented on Jun 2, 2026

    @MichalStrehovsky
    Member

    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.

  4. locked and limited conversation to collaborators on Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Tools-ILLink.NET linker development as well as trimming analyzersblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions