Open tygore587 opened 1 year ago
I'm also facing the same issue.
We also started to experience this issue with other packages even locally.
We have some wrapper code around the azure service bus sdk. They are located in a .net standard project.
The workaround we found was to directly instantiate a class from the package that was not found. If we do this the problem disappears. But we are not comfortable to use .net 7 with these kind of issues because they appeared out of nowhere. We never had a problem before even with .net 7 and .net 6 was stable for month on our prod system.
Just scrolled through the issues and it looks like these problems are in general similar to #48199
These problems could be related to the issue https://github.com/dotnet/runtime/issues/60144 if the exceptions occur after upgrading the dotnet runtime (for example by Windows Update or another service/installer/update) while the application/service is running.
These problems could be related to the issue dotnet/runtime#60144 if the exceptions occur after upgrading the dotnet runtime (for example by Windows Update or another service/installer/update) while the application/service is running.
We are building self containted packages, so this shouldn't be an issue. Also it worked like 99% of the time until it randomly stopped working at all. At the moment we are still at .net 6 because this breaked our production environment like 3-4 times and some developers started to get the same issue randomly on their laptops.
Description
We are experiencing a problem with our .net mvc api running in service fabric which is getting the error
Could not load file or assembly 'Microsoft.AspNetCore.Diagnostics.Abstractions
.The compile target is .net 7.
I search for other bugs and found the issue dotnet/runtime#3252 and searched for direct package references in our project, but found none.
We deploy the api as a self contained package, so the host runtime shouldn't matter?
Reproduction Steps
The problem is, that I can't reproduce it locally. It just happens, when it is deployed. But we can't find the cause.
Expected behavior
Not seeing an error
Actual behavior
Throws an exception:
Regression?
It worked for month using .net 6 before. We just started to see this happen after upgrading to .net 7
Known Workarounds
We don't have one.
Configuration
Which version of .NET is the code running on? .net 7.0.5
What OS and version, and what distro if applicable? Windows Server 2022
What is the architecture (x64, x86, ARM, ARM64)? x64
Other information
If you need more information, please let me know.