Search Unity

Question Assembly not recognizing referenced other assembly classes

Discussion in 'Code Editors & IDEs' started by billygamesinc, Feb 8, 2024.

  1. billygamesinc

    billygamesinc

    Joined:
    Dec 5, 2020
    Posts:
    326
    upload_2024-2-8_6-16-24.png

    This has been happening randomly when I make adjustments to a class name or modify/delete a class in my project.

    Code errors are read properly and there are no runtime errors. Everything runs fine, the issue is that VSC can't detect the classes and its functions with intellisense.

    The only way to fix this is to delete all assemblies and rebuild them from scratch which would take me about an hour at this point.

    I've tried reimporting all and deleting and remake the specific assembly on this class.

    As stated before, all the code in reference to these classes are working as intended. IDE Features such as intellisense or go to reference does not work for the whole project.
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,975
    An hour just for recompiling? Or did you mean delete Library?

    Try to find one of Kurt Dekker's posts about fixing Visual Studio Intellisense issues.
     
  3. billygamesinc

    billygamesinc

    Joined:
    Dec 5, 2020
    Posts:
    326
    Going through the output log, I noticed a common error
    Code (CSharp):
    1. Failed to load project file 'c:\Users\user\Project\PlayerComponents.csproj'.
    2. Microsoft.Build.Exceptions.InvalidProjectFileException: The project file could not be loaded. An error occurred while parsing EntityName. Line 623, position 38.  c:\Users\bill\Aim Trainer Roguelike\PlayerComponents.csproj
    3. ---> System.Xml.XmlException: An error occurred while parsing EntityName. Line 623, position 38.
    These assemblies no longer exist but its still looking for them.

    No it's not related to engine or recompiling. I pretty much remake all the assemblies and reference manually again but the project is starting to get bigger which takes longer to do this.