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.

Leave a comment

Please note that we won't show your email to others, or use it for sending unwanted emails. We will only use it to render your Gravatar image and to validate you as a real person.