Search Unity

error when opening a code file in unity4.5

Discussion in 'Editor & General Support' started by Brodic, May 30, 2014.

  1. Brodic

    Brodic

    Joined:
    Nov 15, 2013
    Posts:
    3
    I updated unity to 4.5 and bad things happened. When I double click a code file in project I get the following errors from MonoDevelop:

    Error while trying to load the project : "xxxx/Assembly-CSharp-firstpass.csproj":expected ';' (3B) but found '/' (2F) Line 157,position 59.
    Error while trying to load the project : "xxxx/Assembly-CSharp.csproj":expected ';' (3B) but found '/' (2F) Line 341,position 59.
    Error while trying to load the project : "xxxx/Assembly-CSharp-Editor.csproj":expected ';' (3B) but found '/' (2F) Line 203,position 59.
    Error while trying to load the project : "xxxx/Assembly-UnityScript-firstpass.unityproj":expected ';' (3B) but found '/' (2F) Line 169,position 59.
    ...
    ...
    ...

    All these error reports are pointing to those "proj" files created by unity automatically when you write down your first line of code.
    even thought I delete them all, and when I reopen a code file , the same problem occurs. And those "proj" file would appear in my project folder again.

    Did any here share the problem? Have you solved it?
     
  2. Bravo_cr

    Bravo_cr

    Joined:
    Jul 19, 2012
    Posts:
    148
    I'm exactly in the same situation. No clue, I have tried to delete all mono related stuff from the project but without luck... Any help will be greatly appreciated,

    Many thanks
     
  3. Bravo_cr

    Bravo_cr

    Joined:
    Jul 19, 2012
    Posts:
    148
    I just found that it happens when you have a dll in the project. Currently working on Mac with the editor in PC,Mac & Linux Standalone
     
  4. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    I guess my suggestion is to open one of the csproj files in a text editor, and see what is on line 157, column 59. Maybe share that file, or a screen shot of part of it so we can help work out what MD is seeing.
     
  5. Bravo_cr

    Bravo_cr

    Joined:
    Jul 19, 2012
    Posts:
    148
    Hi Graham,

    This is one of the errors:

    "Error while trying to load the project '/MyPath/Assembly-CSharp.csproj': excepted ';' (3B) but found '/' (2F) Line 661, position 54.

    And this is what it looks like:

    <Reference Include="HOTween">
    <HintPath>/Users/Cesar/_Bravo/Tanks&PlanesPrototype/Assets/Extensions/HOTween/Plugins/HOTween.dll</HintPath>
    </Reference>


    The exact same project works perfect in the other mac which is the exact same model. I'm afraid it's something more complicated.
     
  6. Bravo_cr

    Bravo_cr

    Joined:
    Jul 19, 2012
    Posts:
    148
    I found the problem: the project name has an unsupported character "&". Change that and it worked again.

    Hope it helps, Cheers
     
  7. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Hmm. Doesn't explain why it worked on the identical other Mac.
     
  8. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    I had the same problem with a "&" in the project folder path. Changing the folder name fixed it as a workaround.
     
  9. Bravo_cr

    Bravo_cr

    Joined:
    Jul 19, 2012
    Posts:
    148
    Graham, well the "exact same project" that I said was "exact" but the project folder name... Thats why it was working in the other mac. Sorry for that :(
     
  10. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Lol. I see. Glad you are sorted.