Resharper-unity: Losing settings in .csproj

Created on 29 Dec 2017  路  8Comments  路  Source: JetBrains/resharper-unity

When moving between Unity and Rider I seem to be losing some settings in my csproj files.

  1. The Root Namespace setting in the csproj gets wiped out
  2. Files added to the project that aren't .cs files are removed from the project. The files are still present and can be seen in Unity, but they no longer show in the project browser.

Most helpful comment

Thank you after googling a bit I found your comments in another Issue that pointed me in the right direction, and it handles both issues I had (files and root namespace). Might have been nice to mention that but I managed to find it on my own.
For future posterity if anyone else runs into this issue: In Unity Edit->Project Settings->Editor

All 8 comments

It is not an issue, it is normal Unity behavior. Unity regenerates sln and csprojs every time. There is also a setting in Unity, which allows you to specify file extensions, which are automatically included in generated csproj.

I am aware of the fact that Unity regenerates it, but Rider is also stepping in and adding data back in. Therefore Rider has the ability to retain settings such as root namespace.

As for a setting to specify file extensions, I was not aware of such a setting but I will look for it thank you.

Thank you after googling a bit I found your comments in another Issue that pointed me in the right direction, and it handles both issues I had (files and root namespace). Might have been nice to mention that but I managed to find it on my own.
For future posterity if anyone else runs into this issue: In Unity Edit->Project Settings->Editor

related to #221

Can't Rider set that field in the settings then? @van800

Yes, technically we can set almost any Unity setting from Rider.
@Nufflee Are you specifically interested in RootNamespace or list of extensions or both?

I'm mostly interested in RootNamespace but extension list seems really useful too. I have no problem with setting it from there but it might be confusing for people who don't know about that Unity setting. @van800

Was this page helpful?
0 / 5 - 0 ratings