the thing that fixed the nuget problems for me was opening visual studio (not vscode) and clearing nuget cache in settings. i don't have a nuget package manager, but i'm sure it has the same thing. after that try launching your project then editting the c# script