Error compiling .NET script C# Hello World

I’m receiving the following error when trying to run the dot net hello world found here Anatomy of .NET (C#, VB) Scripts (notion.site):

Tried the 6 steps here New release. Error dynamically compiling pyRevit runtime - Runtime - pyRevit Forums (pyrevitlabs.io) but still get the same error.

Occasionally I get this error instead:

Error executing .NET script.
System.NullReferenceException: Object reference not set to an
instance of an object.
at
PyRevitLabs.PyRevit.Runtime.CLREngine.GetTypesSafely(Assembly
assembly)
at
PyRevitLabs.PyRevit.Runtime.CLREngine.ExecuteExternalComman.„
assmObj, String className, ScriptRuntime& runtime)
at
PyRevitLabs.PyRevit.Runtime.CLREngine.Execute(ScriptRuntime&
runtime)
at
PyRevitLabs.PyRevit.Runtime.CLREngine.GetTypesSafely(Assembly
assembly)
at
PyRevitLabs.PyRevit.Runtime.CLREngine.ExecuteExternalComman.„
assmObj, String className ScriptRuntime& runtime)
at
PyRevitLabs.PyRevit.Runtime.CLREngine.Execute(ScriptRuntime&
runtime)

I have several c# scripts I created a while ago which started showing this error. I used the Hello World as a sense check. Any ideas what might be happening?