Trying to add references was a distraction and didn't resolve the issue.
The breaking change made on April 28th was that the version of C# used by script actions was rolled back from 11 to 8. Our code uses Raw String Literals (among other things), which is not supported in C# 8.
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/raw-string