Search code examples
c#selenium-rccompiler-warnings

Selenium RC compilation warning for C#


When I compile my code in VS 2010 (.NET 4.0), I get the following warning:

"Warning 1: The referenced assembly "ThoughtWorks.Selenium.Core" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project."

(It calls it a warning but it's really an error because the Selenium namespace can't be used because of this.) I tried adding/removing references to the System.Web namespace with no luck. Does anyone know how to fix this?


Solution

  • Try changing the Target Framework from ".Net Framework 4 Client Profile" to just ".Net Framework 4"

    The client profile is a sort of "slimmed down" version of the .Net 4 framework.