Home

Select is inaccessible due to its protection level error

Hey guys, needs some help here. If the query has any error I am always seeing "Select is inaccessible due to its protection level error" instead of the actual error when I select my configured database from the connection. if I use "None" in the connection , actual error shows up. for example:
When selecting "Local" database

and when selecting "None", proper error shows up

This is a random test query and has nothing to do with this database. Reinstalled Linqpad multiple times and configured Local db several time but no luck. Any help would be appreciated.

Comments

  • No answers, but a couple of questions.

    What version of LinqPad and Dotnet framework are you using?

    Does this happen with any type of database connection?
    If not, what type of connection is it? (In particular, is it using your own custom assembly?)

    Where does the Select(IQueryable, string , params object[] args) method come from? (It looks like dynamic linq - do you have any references or usings for anything like that?)

    If you remove the error what overload is used for the .Select method?

    Can you disable My Extensions and nuget references and most of the usings (you probably just need System
    and System.Linq) and see if it still goes wrong?

Sign In or Register to comment.