Skip to content

.NET 9 SDK seems mandatory to build the application because of dependancy : Microsoft.CodeAnalysis.CSharp.BannedApiAnalyzers.dll #118

@juliengalego

Description

Describe the bug
When I build my .NET Core 8 Application on Azure Devops, it crashes because it needs .NET 9 SDK

"An instance of analyzer Microsoft.CodeAnalysis.CSharp.BannedApiAnalyzers.CSharpRestrictedInternalsVisibleToAnalyzer cannot be created from /home/vsts/.nuget/packages/microsoft.codeanalysis.bannedapianalyzers/4.14.0/analyzers/dotnet/cs/Microsoft.CodeAnalysis.CSharp.BannedApiAnalyzers.dll : Could not load file or assembly 'System.Collections.Immutable, Version=9.0.0.0"

To Reproduce

  • task: DotNetCoreCLI@2
    displayName: 'Publish Web'
    inputs:
    command: publish
    projects: $(project-api-csproj)
    arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory) /p:BranchName=$(Build.SourceBranchName) '
    zipAfterPublish: True
    verbosityRestore: Detailed
    verbosityPack: Detailed

Expected behavior
If a strong dependance to .NET 9 is expected, it should be visible. We also need to know what version is compatible to .NET 8

Environment (please complete the following information):

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions