Stumped by Visual Studio and the Access Modifier

I’m running Visual Studio 2010 and I’ve come up with an issue that has me stumped.

To keep it simple Im testing by trying to run the code samples from class references in the NETMF.Glide.UI library - . Ive tried a handful of the classes, radio button, canvas, check box, data grid to name a few. I start with the EMX C# template in Visual Studio. If I copy the code and run debug as is I get the error [em]‘GHIElectronics.NETMF.Glide.Resources’ is inaccessible due to its protection level[/em]. If I go into the Resources tab and change the Access Modifier to Public that error goes away and I then get other errors –

[ul]CodeAnalysis does not exist in the namespace System.Diagnostics
CodeDom does not exist in the namespace System
CompilerGeneratedAttribute dos not exist in the namespace System.Runtime.CompilerServices[/ul]

These errors only appear after I change the Access Modifier to public. If I change back to Internal they go away but I get the protection level error. Ive tried deleting the Resource.Designer.cs and recreating it but with the same results.

Im using NETMF 4.2 and Glide 1.0.5

Is there another location or method I should be using to set the protection level ?

There’s a bug in the example. It says “Open Program.cs and replace the code with the code below:”, and if you do that, you copy the incorrect namespace. Look for the code

namespace Test
    public class Program

and replace “Test” to your project name, something like:

namespace MFConsoleApplication4 {
    public class Program {

Well, actually it is not a bug, it would have worked if you named yout project “Test”, as per instructions. I assume you didn’t.

@ Simon - thanks for the tip. That seems to be the key. Leave the Access Modifier set for Internal and change the namespace to match my default namespace. Always pays to RTFM. Thanks again