Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Issues with running code in Rider and long enter play mode times

Discussion in 'Editor & General Support' started by Ziomek64, May 22, 2021.

  1. Ziomek64

    Ziomek64

    Joined:
    Aug 16, 2020
    Posts:
    4
    Hello everyone, i have few issues with unity which I will list here:

    1. First one is when I'm running the code in JetBrains Rider (I don't know if it's related to Jetbrains Rider or this csproj file):
    Invalid option ‘8.0’ for /langversion; must be ISO-1, ISO-2, 3, 4, 5 or Default

    I tried changing it to something like latest but Unity switches it back to 8.0 and the issue persists

    2. Long play mode times after I do any edit of my c# script. These long enter play mode times will persist unless i restart the unity. I have the enter play mode box ticked in editor settings. I don't have this problem when I'm doing visual scripting. First load might be longer but then it just works instantly. In c# on the other hand it will stay like that untill I restart which is annoying. I'm talking about multiple play modes that take long after one edit, not just play mode that freezes or something.

    3. Another issue I have that JetBrains Rider somehow don't detect the integration between it and Unity although I have package installed from the package manager. Raider asks me to change editor in external tools which I did and wants me to install the package which I have.

    I would like someone to help me with these issues. I was learning Unity with visual scripting but want to switch to c#. And these are the issues I have right now. The first two are the most crucial I would like to fix. I tried looking these problems on the internet but didn't find anything in particular.

    Using the newest unity version : Unity 2021.1.7

    I have to add that I'm running Windows and I didn't have any of these issues on linux which is kinda weird. But Windows is my daily driver
     
    Last edited: May 22, 2021
  2. Ziomek64

    Ziomek64

    Joined:
    Aug 16, 2020
    Posts:
    4
    Although I fixed it by going to the LTS version all of the problems went away. But why was all of this happening on the newest one? I even tried reinstalling it.
     
  3. BrandonCimino

    BrandonCimino

    Joined:
    Sep 13, 2013
    Posts:
    6
    For anyone who winds up here in the future, this was the solution that worked for me for the
    invalid /langversion
    issue:

    Despite the error message claiming that it is related to the
    /langversion
    , and
    csproj
    files, the actual solution was to change the MSBuild version from
    Auto detected (4.0)
    to
    16.0
    (I used the embedded JetBrains path).

    upload_2021-8-24_0-5-24.png

    Remember not to just hit
    Save
    , and instead hit the dropdown arrow and save it to the correct layers, which probably means
    team-shared
    :
    upload_2021-8-24_0-9-52.png
     
    Last edited: Aug 24, 2021
    DAcKey, jehk27, segant and 6 others like this.
  4. Murphy219

    Murphy219

    Joined:
    Oct 22, 2021
    Posts:
    2
    This helped me thank you. I wasn't even using rider at the time my I needed to renew my subscription but I was having the same issue no matter what editor I was using.
     
  5. lh_blackForest

    lh_blackForest

    Joined:
    Jul 28, 2019
    Posts:
    1
    This is it, finally, after some misleading posts. Thank you :cool:
     
  6. jmguillemette

    jmguillemette

    Joined:
    Mar 4, 2015
    Posts:
    53
    ive started having this same / similar issue after a fresh install of unity and rider./

    Invalid option '9.0' for /langversion; must be ISO-1, ISO-2, 3, 4, 5 or Default

    no solution so far. The above work around is not fully resolving the problem.
     
  7. RGV

    RGV

    Joined:
    Jan 25, 2016
    Posts:
    48
    Same this for some years now.