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
Not sure about putting nuget.targets in here. I originally removed it because it caused issues for people building without Windows.

It's possibly not an issue any more.