How to handle CS9057 error after adding Microsoft.Extensions.Http.Resilience as a dependency #5055
-
I have a .NET 6 project and I wanted to add CSC : error CS9057: The analyzer assembly '/root/.nuget/packages/microsoft.extensions.telemetry.abstractions/8.3.0/analyzers/dotnet/cs/Microsoft.Gen.Logging.dll' references version '4.4.0.0' of the compiler, which is newer than the currently running version '4.3.0.0'. [/cs9057/Issue/Issue.csproj]
CSC : error CS9057: The analyzer assembly '/root/.nuget/packages/microsoft.extensions.telemetry.abstractions/8.3.0/analyzers/dotnet/cs/Microsoft.Gen.Metrics.dll' references version '4.4.0.0' of the compiler, which is newer than the currently running version '4.3.0.0'. [/cs9057/Issue/Issue.csproj] I found similar issue, but so far no solution. To reproduce the issue, I prepared a simple FROM mcr.microsoft.com/dotnet/sdk:6.0
WORKDIR cs9057
# create MWE
RUN dotnet new sln \
&& dotnet new classlib -f net6.0 -o Issue \
&& dotnet sln add Issue/Issue.csproj \
&& dotnet add Issue package Microsoft.Extensions.Http.Resilience
RUN dotnet build /WarnAsError Copy into a Any ideas how to handle this issue? |
Beta Was this translation helpful? Give feedback.
Answered by
KalleOlaviNiemitalo
Mar 19, 2024
Replies: 1 comment 4 replies
-
Can you upgrade to a higher version of .NET SDK? You'd still be able to target .NET 6.0. |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
g0loob
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you upgrade to a higher version of .NET SDK? You'd still be able to target .NET 6.0.