Example error message: Inconsistent accessibility: field type ‘MyPublicClass’ is less accessible than field ‘MyPublicObject.MyPublicStaticClassObject’ We often use a public static class ApMain in our projects: Within this we create other objects as public static, so they can be accessed throughout the app: These can then be accessed using: If you get this error when you […]
Category: Issues
xaml.cs Does Not Exist in Current Context Error
Seems to be a VS bug whereby in some instances adding or renaming an object in the xaml file causes “Does Not Exist in Current Context Error” when using the object in the .xaml.cs file. Looking online it seems to be something that plagues lots of devs… Compiles OK but Intellisense red lining the object […]
File path is too long
When building, particularly for release versions, VS can add a lot of characters to paths with its output files and if you end up with a path over 260 characters you can get build errors caused by the path being too long (file inaccessible etc errors). A solution is to enable long file path support […]
“is inaccessible due to its protection level”
"is inaccessible due to its protection level" error message Have you used "public" when creating the class and the constructor method the class you are accessing?