is not declared. It may be inaccessible due to its protection level


is not declared.  It may be inaccessible due to its protection level

I received the above error while creating a new WinForms project inside of Visual Studio 2010 with a couple of referenced assemblies. By default, the WinForms applications in VS2010 are set to target the .Net Framework 4 Client Profile which is a smaller sub set of the entire framework meant to be more compact to deploy for applications that don’t need the entire framework. The assemblies that I reference however access parts of the framework not included in the client profile. Changing the program to target the entire .Net Framework 4 in the project properties allowed the project to compile.