1

I have been using vs2013 for my Unity game with VS Unity plug-in.

Intellisense is working just fine except for my partial classes.

For some reasons that I cannot fathom, Intellisense's complete word function does not work.

If I write down the whole method/variable, it does not show any errors BUT when I'm half done with my typing, it shows up on very rare occasions.

I am currently wondering what may be the cause of this problem but not even close to finding one reason.

Could be that my partial class (split into 2) is large since both added up contains more than 20000 lines (which is the reason I split them).

But then, its merely 20,000 lines of code and is just a medium sized project compared to what other projects may contain.

Any help would be appreciated.

revolute
  • 33
  • 3
  • 1
    Does VS have a project open (in the "Solution Explorer" in the column to the right) which refers to the `.cs` file your are editing? If yes, are all the assembly references in that project OK and "resolved" by VS? What happens if you start typing `System.Obje` inside the class in that file? Will it suggest `Object`? I think yes, because that type is declared in `mscorlib.dll` which should always be "known" to VS. Can you give an example of an identifier (name) which VS will _not_ auto-complete for you? If yes, think of where that "word" (identifier) is defined. – Jeppe Stig Nielsen Dec 01 '14 at 09:07
  • 1
    Yes, yes, every other word completion suggestions popup as usual, and if I type System.Obj , it will suggest System.Object as expected. As I have stated above, this weird behavior occurs every now and then. And compiling the project does not cause any errors nor running that particular part of the code causes any errors neither. – revolute Dec 01 '14 at 09:29
  • 1
    Please give an example of a completion that does not work (does not work everytime). Also specify where that member is defined/declared, and what it is. Why do you think the fact that the file in question contains a `partial class` is relevant? Are some of the "parts" of the class in another location? – Jeppe Stig Nielsen Dec 01 '14 at 11:24
  • It is kind of hard to recreate same results. Even when I'm working on the same method, same block of the code, Intellisense follows up as expected but in some cases, it doesn't. – revolute Dec 02 '14 at 00:57
  • It just happens so that whenever I try to access a certain class that is partial class, Intellisense fails to return methods and variables for both classes. I currently have two classes that have the same namespace : "public static partial class Database" on different .cs pages. My friend split this class into two different parts to allow both of us to lock and edit the same class without waiting for the other to release the lock. – revolute Dec 02 '14 at 01:02
  • OK, so are the two `.cs` files in the same folder? Does the "project" in VS (the `.csproj` file) correctly refer both of these `.cs` file names? Is it the case that members from one of the "parts" of the split class always show up, while members of the other "part" are (sometimes) problematic? – Jeppe Stig Nielsen Dec 02 '14 at 08:27
  • Yes, they are both in the same folder and yes they are referred correctly. As far as I know, the other part shows up fine, at least whenever I try to type the other part variables/methods/classes. – revolute Dec 03 '14 at 01:41

0 Answers0