Search code examples
c#.netdebuggingvisual-studio-2015class-library

error CS0103: The name does not exist in the current context when debugging referenced project


I have a solution containing two class library projects. e.g. Project 1 and Project 2

I have added a reference in Project 1 referencing Project 2

I am calling a static class that is in Project 2 from Project and no errors so far. When debugging and I step into the static class (Project 2), its executing fine but I cannot inspect any of the variables.

For example when typing a variable in Immediate window i get error CS0103: The name does not exist in the current context - I have stepped over this line and executed successfully.

I can understand that technically I am in the context of Project 1, but how can I debug the Project 2 class fully? i.e. get into that context


Solution

  • Please, make sure your Project 2 is not in Release configuration.