In my case the issue was, I was referencing a project where I commented out all the .cs
files.
For example ProjectApp references ProjectUtility. In ProjectUtility I only had 1 .cs
file. I wasn't using it anymore so I commented out the whole file. In ProjectApp I wasn't calling any of the code from ProjectUtility, but I had using ProjectUtility;
in one of the ProjectApp .cs
files. The only error I got from the compiler was the CS0006 error.
I uncommented the .cs
file in ProjectUtility and the error went away. So I'm not sure if having no code in a project causes the compiler to create an invalid assembly or not generate the DLL at all. The fix for me was to just remove the reference to ProjectUtility rather than commenting all the code.
In case you were wondering why I commented all the code from the referenced project instead of removing the reference, I did it because I was testing something and didn't want to modify the ProjectApp.csproj
file.