Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rider apparently creating superfluous .meta files #1481

Closed
Kylotan opened this issue Jan 13, 2020 · 14 comments · Fixed by #1489
Closed

Rider apparently creating superfluous .meta files #1481

Kylotan opened this issue Jan 13, 2020 · 14 comments · Fixed by #1489
Assignees

Comments

@Kylotan
Copy link

Kylotan commented Jan 13, 2020

Since a recent upgrade, I've found that sometimes I am getting a bunch of meta files created for files outside the Assets directory and that should not have meta files. These are mostly for csproj files. I just have to keep deleting them.

I can't 100% verify that it is Rider and not Unity causing this, but:

  1. It's only happening to me on this project - everyone else uses Visual Studio
  2. It only happens when Rider is in focus, and when it's active - I believe I saw it say "synchronising project" at the bottom, before flashing up the 'do you want to add this to Git?' dialog

It's probably worth noting that our repository contains both standard Unity projects and a packages directory, and maybe this is confusing Rider and making it think the root is further up than normal.

@van800 van800 self-assigned this Jan 14, 2020
@van800 van800 added this to the Rider 2020.1 milestone Jan 14, 2020
@van800
Copy link
Contributor

van800 commented Jan 14, 2020

@Kylotan What is your Rider version and Unity version? When this issue happens again, please list here paths of those meta files. A screenshot may help.
I tried to reproduce, but no, it doesn't happen.
Feel free to reopen the issue.

@van800 van800 closed this as completed Jan 14, 2020
@Kylotan
Copy link
Author

Kylotan commented Jan 15, 2020

Sorry, should have remembered those details.

  • Unity 2019.2.1f1
  • Rider 2019.3.1

Can't share full paths due to client confidentiality but here are some examples of meta files that appeared in the directory that contains Assets.
image

@van800 van800 reopened this Jan 15, 2020
@Nezz
Copy link

Nezz commented Jan 15, 2020

Our team is experiencing the same issue. It happens on both Windows and macOS. Worst of all, the Rider plugin even causes the meta files to get created outside the folder of the repository.

Example folder structure:

  • MyRepo
    • stylecop.json
    • UnityProject
      • MyCode.csproj
      • Assets
        • Actual files that should have meta files

Meta files get created for:

  1. MyRepo
  2. stylecop.json
  3. MyCode.csproj

Solution explorer shows this:
Issue

Can you try reproducing it in a git repo where the Unity project is one folder down and there's a stylecop JSON file in the root of the git repo?

Versions:
JetBrains Rider 2019.3.1
Build #RD-193.5662.14, built on December 19, 2019
Unity 2018.4.15f1

@van800
Copy link
Contributor

van800 commented Jan 16, 2020

Reproduced, thank you!

van800 added a commit that referenced this issue Jan 16, 2020
van800 added a commit that referenced this issue Jan 16, 2020
* fix #1481

* fix metafiletracker for file: based packages

* fix because folder and asmdef and assembly name can be of different names
van800 added a commit that referenced this issue Jan 16, 2020
* fix #1481

* fix metafiletracker for file: based packages

* fix because folder and asmdef and assembly name can be of different names
@van800
Copy link
Contributor

van800 commented Jan 16, 2020

cherry-pick to 2019.3.2 #1491

@Kylotan
Copy link
Author

Kylotan commented Jan 24, 2020

Thanks for the rapid fix! But, is there any workaround in the meantime? This is making it very hard to work with a Unity project and version control when it keeps making extra meta files everywhere, including in submodules.

@van800
Copy link
Contributor

van800 commented Jan 24, 2020

@Kylotan
You may set some special gitignore rules.
You may use one of the older builds https://www.jetbrains.com/rider/download/other.html
However 2019.3.2 is planned to be released at the end of next week.

@van800
Copy link
Contributor

van800 commented Feb 12, 2020

Sorry for delay. 2019.3.2 with this fix was released.

@bartlomiej-dawidow
Copy link

Confirmed, the issue is gone on my end. Note that after updating Rider you have to restart Unity, I guess that otherwise the plugin doesn't reload.

@bartlomiej-dawidow
Copy link

bartlomiej-dawidow commented Feb 13, 2020

OK that was premature, it worked once but failed the next time when unshelving a patch with moved .metas:
Screen Shot 2020-02-13 at 23 57 39

@bartlomiej-dawidow
Copy link

My workaround is handpicking .meta files and unshelving them first, and then unshelving everything else.

@bartlomiej-dawidow
Copy link

@van800 This is just to let you know that we are still seeing the error in Rider 2019.3.4.

@van800
Copy link
Contributor

van800 commented Mar 11, 2020

@bartlomiej-dawidow Thank you for the heads-up, somehow I missed your previous comments. It seems that you are facing some issue different from originally reported. This issue and its fix are all about .meta files outside Assets folder. It you have some different issue, please report it separately. I would be happy to investigate.

@bartlomiej-dawidow
Copy link

@van800 Sure: #1579

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants