0

why when i pull the project from the visualstudio team explorer, the assembly showed as red color line while my project is able to build.

enter image description here

The project is able to build with the error. How i make my project does not show the red color line anymore?

ryan1555
  • 165
  • 10
  • https://stackoverflow.com/questions/5567945/type-or-namespace-name-does-not-exist Please follow this link. It may help you – Prabhanshu tiwari Nov 15 '18 at 07:40
  • what version of VS are you using? Are you sure the .cs file you are showing us is in the same project in the solution explorer? What version of the framework? – noobed Nov 15 '18 at 07:40
  • Not having any knowledge of that library, all I'll do here is emphasise - assembly names and namespace names matching is a *convention*, not a requirement. So, check that library and see what namespaces its types are actually in. – Damien_The_Unbeliever Nov 15 '18 at 07:49
  • @Prabhanshutiwari that one is not fixing my problem, i checked it is same framework , and their problem is cannot compile, i am able to build but just showing red line – ryan1555 Nov 15 '18 at 07:51
  • @noobed 4.6.1, visual studio 2017 – ryan1555 Nov 15 '18 at 07:51
  • @Damien_The_Unbeliever the namespace that i specificied in the picture i double checked, it does exist in the name space of that library. – ryan1555 Nov 15 '18 at 07:52
  • Well, I trust Visual Studio more, so the only other possibility I can think of at the moment is that you're inspecting the wrong set of references in the solution explorer. – Damien_The_Unbeliever Nov 15 '18 at 08:03
  • @Damien_The_Unbeliever but i can build everything, but the color is still show – ryan1555 Nov 15 '18 at 08:14
  • Could you try to Clean the solution, close VS, open VS, Build again? – noobed Nov 15 '18 at 08:23
  • Looks like the community has already stumbled upon the same issue you are having in this question: https://stackoverflow.com/questions/17703004/visual-studio-displaying-errors-even-if-projects-build – noobed Nov 15 '18 at 08:33
  • 1
    @noobed it solved my problem thanks – ryan1555 Nov 15 '18 at 08:55

1 Answers1

1

The solution is, find the root path of the project, go find the path of the hidden directory .vs , delete everything inside .vs/{project-name}/ , it solve my problem

ryan1555
  • 165
  • 10