Assuming that you aren’t missing the >
operator in the Immediate Window, there could be problems if you are trying to evaluate an expression at design-time in a multi-project solution or even a web project.
According to MSDN:
If you are attempting to evaluate a function in a project that is not
the startup project for the solution and you receive an error, try
selecting the project in Solution Explorer and attempt the evaluation
again.
Also:
You cannot use design time expression evaluation in project types that
require starting up an execution environment, including Visual Studio
Tools for Office projects, Web projects, Smart Device projects, and
SQL projects.