Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio doesn't recognize namespace inside same project

The problem that i have is that when i open the solution that i am working on, in some files it will not recognize a namespace even thought that namespace is part of the same project and the solution builds fine. I could get rid of this problem by deleting my .suo file in the solution root folder but it is getting annoying to delete the .suo file every time i load the solution, plus i like the options that visual studio remembers the documents that i had opened when i closed the solution. I have heard that this may be caused by an extension but i disabled all the extensions and it still happens.

I am using visual studio ultimate 2013. I am working on a big solution that is connected with tfs and many peoples are working on it.

Does anybody have any idea why this is happening?

like image 681
ZuZu Avatar asked Jul 05 '26 12:07

ZuZu


1 Answers

This question is old and I'm on a newer version of Visual Studio (2017), but having the same problem and my Google search led me to this question.

The solution to this in VS 2017 seems to be to delete the .vs folder that's in the same folder as the solution file. It's hidden, so you'll have to either show hidden files to see it or open a command prompt in that location and run the command

attrib -h .vs

like image 101
dwilliss Avatar answered Jul 07 '26 01:07

dwilliss



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!