question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when running under .NET 6.0.200 in a container

See original GitHub issue

We are running dotnet-format in a container (mcr.microsoft.com/dotnet/sdk:6.0). As of today, that tag was upgraded to .NET 6.0.200, and dotnet format started failing with the following error:

Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.

I creating a simple example here: https://github.com/mispencer/net6_0_200-docker-format-issue/blob/master/Dockerfile The build-working target, referencing a direct image hash to the old 6.0.10x image, works. The build-broken target, referencing mcr.microsoft.com/dotnet/sdk:6.0 tag and thus 6.0.200, fails with said error.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ranma42commented, Feb 17, 2022
0reactions
JoeRobichcommented, Mar 2, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't access .Net Core application through Docker Container
Your application is listen for connection inside container (localhost) only. Now listening on: http://localhost:5000.
Read more >
Breaking changes in .NET 6
Binary compatible - Existing binaries will load and execute successfully without recompilation, and the run-time behavior won't change.
Read more >
"You must install .NET Desktop Runtime 6.0.4 (x64)" error
When I try running the binaries on a Windows 10 machine, I get the following message box: To run this application, you must...
Read more >
Installing .NET 6 on your M1 Mac (manually) - Maarten Merken
In this short article, I'll show you how to uninstall any previous dotnet versions on your M1 Mac and install the latest .NET...
Read more >
Fixing NuGet error: Unable to load the service index for source
Something I've ran into several times is when running dotnet restore or dotnet add package <name> , the tool throws and error with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found