Windows Phone 8 Building Error

Hello, when I try to build for Windows Phone 8 I get the following error:

Error building Player: Exception: Error: type `System.EnvironmentVariableTarget` doesn't exist in target framework.

Error: type `System.EnvironmentVariableTarget` doesn't exist in target framework.

Anyone has any idea?

Remove whatever it is that uses that part of .Net, because its not a part of the Windows Phone .Net API.

Windows Phone 8 only uses a subset of the full .Net API. You can read more about it here:

Windows Phone 8 .Net