I have a .NET 3.5 (target framework) web application. I have some code that looks like this:
public string LogPath { get; private set; }
public string ErrorMsg
This also happens on a raw web site project where there was no web.config generated.
Although the solution file said 3.5, .Net needed the web.config to state it also to recognize. I ran debug allowing it to create a webconfig, and all was working.
So it is like the answer provided, but just make sure you have one.