Right-click stdafx.cpp in Solution Explorer and choose Properties. Under C/C++ > Precompiled Headers, set "Precompiled Header" to "Create (/Yc)". You may also need to set "Precompiled Header File" to "stdafx.h" and "Precompiled Header Output File" to whatever makes sense ("$(IntDir)$(TargetName).pch" in most cases).
Unless there are other issues too, that should do it.