Visual Studio 2019 - external routines sayiing "It may be inaccessable"

Iain Hayward 21 Reputation points


I am working on some legacy code and have been noticing problems with VS2019. Today I am getting the error messages on all external call to a local DLL. The message is saying "xxxx routine is not declared. It may be inaccessible due to it's protection level". However, the module runs in debug without error....But all the calls are highlighted with a red line underneath... Any thoughts what's going on? The language is VB.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,106 questions
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,403 questions
0 comments No comments
{count} votes

Accepted answer
  1. Karen Payne MVP 34,591 Reputation points

    I've seen this when targeting .NET 5 and not with lower .NET Frameworks. A telltale sign that the IDE is incorrect is as with you I can replicate this and still run and actually go to the definition of any line as per below.


    Here is where the other images comes from, select menu item project then show all files.


    Then here is a incorrect assessment by Visual Studio



    I've not reported this as I have a experimental setup within Visual Studio. If this truly bothers you then report it to Microsoft via the feedback/report an issue button.


    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful