Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible Microsoft.CodeAnalysis.CSharp versioning with Razor #2266

Closed
matthid opened this issue Feb 10, 2023 · 1 comment
Closed

Incompatible Microsoft.CodeAnalysis.CSharp versioning with Razor #2266

matthid opened this issue Feb 10, 2023 · 1 comment
Milestone

Comments

@matthid
Copy link

matthid commented Feb 10, 2023

Because of #2261 we upgraded to latest but our benchmarks broke with:

// Build Error: Exception! 
Message: Method not found: 'Void Microsoft.CodeAnalysis.CSharp.CSharpCompilationOptions..ctor(Microsoft.CodeAnalysis.OutputKind, Boolean, System.String, System.String, System.String, System.Collections.Generic.IEnumerable`1<System.String>, Micro
soft.CodeAnalysis.OptimizationLevel, Boolean, Boolean, System.String, System.String, System.Collections.Immutable.ImmutableArray`1<Byte>, System.Nullable`1<Boolean>, Microsoft.CodeAnalysis.Platform, Microsoft.CodeAnalysis.ReportDiagnostic, Int32
, System.Collections.Generic.IEnumerable`1<System.Collections.Generic.KeyValuePair`2<System.String,Microsoft.CodeAnalysis.ReportDiagnostic>>, Boolean, Boolean, Microsoft.CodeAnalysis.XmlReferenceResolver, Microsoft.CodeAnalysis.SourceReferenceRe
solver, Microsoft.CodeAnalysis.MetadataReferenceResolver, Microsoft.CodeAnalysis.AssemblyIdentityComparer, Microsoft.CodeAnalysis.StrongNameProvider, Boolean, Microsoft.CodeAnalysis.MetadataImportOptions, Microsoft.CodeAnalysis.CSharp.NullableCo
ntextOptions)'.,
Stack trace:
   at BenchmarkDotNet.Toolchains.Roslyn.Builder.Build(GenerateResult generateResult, BuildPartition buildPartition, ILogger logger, CancellationToken cancellationToken)
   at BenchmarkDotNet.Toolchains.Roslyn.Builder.Build(GenerateResult generateResult, BuildPartition buildPartition, ILogger logger)
   at BenchmarkDotNet.Running.BenchmarkRunnerClean.Build(BuildPartition buildPartition, String rootArtifactsFolderPath, ILogger buildLogger)

// BenchmarkDotNet has failed to build the auto-generated boilerplate code.
// It can be found in C:\Dev\<proj>\Src\BasicQueryPerformance\bin\Release\net48
// Please follow the troubleshooting guide: https://benchmarkdotnet.org/articles/guides/troubleshooting.html

In our situation we reference benchmark-dotnet indirectly and because of that Microsoft.CodeAnalysis.Common (and therefore Microsoft.CodeAnalysis.CSharp) was silently updated to 3.9.0. For example due to Microsoft.CodeAnalysis.Razor.
As a workaround I managed to remove the project reference by removing some benchmarks to follow up on the other issue.

Can we get a release with CodeAnalysis.Common 3.9.0 or at least one that is compatible with that version (I managed to try with 3.3.1 but that one is already failing).

Best,
Matthias

@matthid
Copy link
Author

matthid commented Feb 10, 2023

It is interesting to note that a previous version apparently works fine...

dennishermann pushed a commit to dennishermann/BenchmarkDotNet that referenced this issue Mar 13, 2023
@AndreyAkinshin AndreyAkinshin added this to the v0.13.6 milestone Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants