Skip to content

Breaking change in 3.3.1 #39524

@JohanLarsson

Description

@JohanLarsson

I have a library that has this call:

return new CSharpCompilationOptions(
    OutputKind.DynamicallyLinkedLibrary,
    allowUnsafe: true,
    specificDiagnosticOptions: CreateSpecificDiagnosticOptions(descriptors, suppressed));

It is compiled vs Microsoft.CodeAnalysis.CSharp.Workspaces 3.0.0 and shipped in a nuget with dependency constraint Microsoft.CodeAnalysis.CSharp.Workspaces (>= 3.0.0)

Problem is if consumer of the library updates to Microsoft.CodeAnalysis.CSharp.Workspaces 3.3.1 things explode:

System.MissingMethodException : Method not found: 'Void Microsoft.CodeAnalysis.CSharp.CSharpCompilationOptions..ctor(Microsoft.CodeAnalysis.OutputKind, Boolean, System.String, System.String, System.String, System.Collections.Generic.IEnumerable1<System.String>, Microsoft.CodeAnalysis.OptimizationLevel, Boolean, Boolean, System.String, System.String, System.Collections.Immutable.ImmutableArray1<Byte>, System.Nullable1<Boolean>, Microsoft.CodeAnalysis.Platform, Microsoft.CodeAnalysis.ReportDiagnostic, Int32, System.Collections.Generic.IEnumerable1<System.Collections.Generic.KeyValuePair`2<System.String,Microsoft.CodeAnalysis.ReportDiagnostic>>, Boolean, Boolean, Microsoft.CodeAnalysis.XmlReferenceResolver, Microsoft.CodeAnalysis.SourceReferenceResolver, Microsoft.CodeAnalysis.MetadataReferenceResolver, Microsoft.CodeAnalysis.AssemblyIdentityComparer, Microsoft.CodeAnalysis.StrongNameProvider, Boolean, Microsoft.CodeAnalysis.MetadataImportOptions, Microsoft.CodeAnalysis.CSharp.NullableContextOptions)'.

image

It is painful!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions