Code check handler

Tidied it up a bit as it wouldn't compile.

Got it to return all errors instead of doing a check then returning any errors etc I can change it back if you prefer

Not sure what VS has done to csproj - again I can remove the nuget stuff if needed
this shouldn't be removed