Error 1 Command line error D8045 : cannot compile C file '.\HelloWorld.c' with the /clr option cl
Solution:
It seems that you have created .NET console program instead of native program. When you start new project then go to "Visual C++" project type (on the left pane), expand this node and select "Win32". Then in the right pane select "Win32 Console Application".