Q:

How to compile using VS2008 so binary doesn't require .NET?

I'm trying to compile a very simple C application using VS2008. My problem is that the resultant binary requires systems to have .NET installed. No actual code within the project uses .NET functionality, but I get errors during execution on any system that doesn't have .NET. 
So, is there anyway to compile using VS2008 so the resultant binary can run on a system without .NET?

A:

In the Project Properties dialog, go to Configuration Properties | General.  The option for "Common Language Runtime support" should be set to "No Common Language Runtime Support."  Then Rebuild.
EDIT: Also check the Advanced Linker options whose names start with CLR.  You shouldn't see any /CLR* settings for those 3 items.  If you are using a non-default manifest, make sure it doesn't declare any CLR dependencies either.

A:

Simply create a C/C++ project. At the "New Project" dialog, under Visual C++, you have a bunch of options. All the ones in the CLR subcategory are .NET (C++/CLI), and the Win32 ones (as well as "Empty project") are native C/C++ projects.
You can change this setting on existing projects under project properties -> General -> Common Language Runtime Support.
Edit
It is possible that the problem isn't actually .NET, but the C runtime. In that case, specify the non-DLL versions under project properties -> C/C++ -> Code Generation -> Runtime Library.
(And if that is the case, you could have made things a lot easier for everyone by telling us what you knew, rather than what you'd assumed about the problem. ;))

