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

Updates MSBuild references #282

Merged
merged 2 commits into from
Sep 8, 2024
Merged

Updates MSBuild references #282

merged 2 commits into from
Sep 8, 2024

Conversation

REscobar
Copy link
Contributor

Fixes #281

🚀 Pull Request Template

Description

This PR updates MSbuild references to support C# 12 features which are not buildable using latest public version of Buildalyzer

A test case was added which would fail withouth this commit

@Corniel
Copy link
Contributor

Corniel commented Jul 28, 2024

This does not work when you just update these dependencies yourself in your own project?

@REscobar
Copy link
Contributor Author

Setting up a project, referencig Buildalyzer and updating those references locally does allow Buildalyzer to build projects with C# 12 features.

But I'm not using Buildalyzer directly, I'm using https://github.com/eNeRGy164/LivingDocumentation, which is a dotnet command line tool, to analyze my projects but I'm unable to do so beacuse the referenced and the latest version of Buildalyzer can't build them.

@phmonte
Copy link
Owner

phmonte commented Jul 31, 2024

@REscobar Thank you very much for contributing, I intend to evaluate your PR this week, I need to understand if we really won't have a backwards compatibility problem, there are some situations that are not possible to simulate in unit tests.

@Corniel do you see any problem? I appreciate your opinion.

@Corniel
Copy link
Contributor

Corniel commented Jul 31, 2024

If we take a look at: Roslyn's release notes, we can conclude that v4.4.0 (our current version) is almost 2 years old, which supports .NET 7.0 and C# 11. Although I would argue by explicitly including v4.10.0 it should work for .NET 8.0 and C# 12 too, sticking to a version that supports up to a framework version that Microsoft does not support anymore, makes no sense.

We have no paying customers (as far as I know) that would have issues with old systems relying on this older version that can not update. So, I think we should do it.

That being said: I think we should define a strategy on how to deal with this dependencies: Should we always aim to go for the latest stable version out there?

@@ -19,8 +19,8 @@ ToBeReleased
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.10.0" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you try this one ([4,)) too? Did this work as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not work with [4,), version 4.0.1 gets installed and fails to build a project with C#12 features

Copy link
Contributor

@Corniel Corniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in favour of merging this.

@phmonte phmonte merged commit cfe8e01 into phmonte:main Sep 8, 2024
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

Successfully merging this pull request may close these issues.

Buildalyzer should be able to build projects with C# 12 language features
3 participants