15,609,978 members
See more:
One of my net core 5 web apps has just given me this runtime error when I try to run it from Visual Studio 2019 Community

Could not load type 'System.Runtime.CompilerServices.DefaultInterpolatedStringHandler' from assembly 'System.Runtime, Version=6.0.0.0

I can't see anything in my project that uses that assembly ? all was good until today Windows updates maybe ? I'm currently on the latest version of Win 10.

What I have tried:

Googled and all the usual stuff
If I build and run it from a Linux terminal there isn't a problem
Posted
BillWoodruff 2-Jan-22 12:01pm
Is there any way you can examine the project file, or other app settings, to see if there is a valid reference to 'System.Runtime, Version=6.0.0.0 ?
pkfox 3-Jan-22 3:54am
Hi Bill, thanks for replying - there is no reference to it in the .csproj file, but it is shown under Dependencies\Microsoft.NETCore.App which points to a physical file in C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.dll - but that file is dated 23/11/2021
BillWoodruff 4-Jan-22 10:41am
Sorry, that's the only thing i can think of ... one way to check that might be to look for some other call to that librarys facilities and see if that, also, breaks ?
Maciej Los 12-Jan-22 15:29pm
I'd suggest to close VS, delete hidden folder .vs, open project and build project again.