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

[BUG] CS9057 when building with Visual Studio LTSC #1809

Open
2 tasks done
jeremy-visionaid opened this issue Apr 11, 2024 · 3 comments
Open
2 tasks done

[BUG] CS9057 when building with Visual Studio LTSC #1809

jeremy-visionaid opened this issue Apr 11, 2024 · 3 comments
Labels
area/core Issue/Discussion/PR that has to do with the core of the toolkit bug Something isn't working unverified

Comments

@jeremy-visionaid
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

CSC : error CS9057: The analyzer assembly 'C:\Users\ContainerUser.nuget\packages\communitytoolkit.maui\8.0.1\analyzers\dotnet\cs\CommunityToolkit.Maui.Analyzers.dll' references version '4.9.0.0' of the compiler, which is newer than the currently running version '4.8.0.0'.

Expected Behavior

Build succeeds

Steps To Reproduce

Build a project referencing CommunityToolkit.Maui with an LTSC release of Visual Studio (e.g. 17.8)

Link to public reproduction project repository

NA

Environment

- .NET MAUI CommunityToolkit: 8.0.1
- OS: Windows
- .NET MAUI: 8.0.20

Anything else?

Can the Microsoft.CodeAnalysis.CSharp reference be set to an LTSC equivalent version (i.e. 4.8.0) or is there something the project requires from 4.9.2?

@jeremy-visionaid jeremy-visionaid added bug Something isn't working unverified labels Apr 11, 2024
@vhugogarcia vhugogarcia added the area/core Issue/Discussion/PR that has to do with the core of the toolkit label Apr 13, 2024
@VladislavAntonyuk
Copy link
Collaborator

Add global.json file to ensure you use .net 8.
I had the same issue after installing .net 9

@jeremy-visionaid
Copy link
Author

@VladislavAntonyuk Thanks, I do already have a global.json specifying dotnet 8 allowing to roll forwards the latest minor release. So it works locally when rolling forwards, but it fails in CI where the toolchain might be older.

@riccardominato
Copy link

I had the same issue. Updating to the latest version of .NET 8 solved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issue/Discussion/PR that has to do with the core of the toolkit bug Something isn't working unverified
Projects
None yet
Development

No branches or pull requests

4 participants