Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

CS8032 analyzer warnings in empty EF Core project in Rider

+2
−0

I'm evaluating JetBrains Rider 2023.3 on Linux and almost immediately ran into a compiler warning that I don't understand. Attempting to isolate it, I created a new solution containing a .NET 6 class library project. The project has only one explicit dependency, Microsoft.EntityFrameworkCore 7.0.14. The project contains no class files. Build emits these CS8032 warnings:

An instance of analyzer Microsoft.EntityFrameworkCore.InternalUsageDiagnosticAnalyzer cannot be created from /home/kevin/.nuget/packages/microsoft.entityframeworkcore.analyzers/7.0.14/analyzers/dotnet/cs/Microsoft.EntityFrameworkCore.Analyzers.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..

An instance of analyzer Microsoft.EntityFrameworkCore.UninitializedDbSetDiagnosticSuppressor cannot be created from /home/kevin/.nuget/packages/microsoft.entityframeworkcore.analyzers/7.0.14/analyzers/dotnet/cs/Microsoft.EntityFrameworkCore.Analyzers.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..

The same warnings sometimes appear with dotnet build the command line and sometimes do not. I can consistently make them appear on the command line by running dotnet build --force after a build in Rider, but only once:

  1. Trigger a build in Rider by editing a comment. Warnings appear.
  2. Run dotnet build on the command line. Warnings do not appear.
  3. Run dotnet build --force on the command line. Warnings appear.
  4. Run dotnet build --force again. Warnings do not appear.

Is this caused by something Rider is trying to do, or perhaps some misconfiguration?

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+2
−0

I resolved this by installing Microsoft's dotnet-sdk-8.0 instead of Ubuntu's dotnet-sdk-6.0. Here's a loose summary of Microsoft's instructions.

  1. Remove existing dotnet packages:
sudo apt remove 'dotnet*' 'aspnet*' 'netstandard*'
  1. Deprioritize the Ubuntu packages by creating a file in /etc/apt/preferences.d/ containing the following:
Package: dotnet* aspnet* netstandard*
Pin: origin "archive.ubuntu.com"
Pin-Priority: -10
  1. Add the Microsoft repo:
sudo apt-add-repository https://packages.microsoft.com/ubuntu/22.04/prod
  1. Install the .NET 8 SDK:
sudo apt update
sudo apt install dotnet-sdk-8.0
History
Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »