CSharp Files Are Considered Non Solution Files (Prevents Cleanup and Reformat Actions)
Hello, I'm working on a codebase with lots of projects under one solution and many of the files in the older projects are being color coded as non-solution files (a brown color). This prevents the “cleanup and reformat” action since that only works on solution files which is not great. New projects don't seem to have any issues.
The solution builds and runs just fine, and with the exception of “cleanup and reformat” (and a couple other things) the functionality is still there. I have tried invalidating caches and deleting the .idea folder for a complete reset but no good.
In the image you can see one project's files are all non-solution whereas another project's files are just fine for some reason. Even when I use Rider (version 2023.3) to add a new file to the SkyWire.Pos.Model project, it is still brown colored. Any help would be appreciated, thank you!
Please sign in to leave a comment.
Hi Tylersyme!
Could you please check the settings for me? Go to the Elements to skip section of File | Settings | Editor | Inspection Settings and check if there are no unexpected patterns added.
Also, could you share the SkyWire.Pos.Model.csproj and .sln files? You can upload them to our server and share the ID. Thanks!
Thank you Alexandra,
I think elements to skip looks correct.
Here is the id to those files 2024_01_05_3gMvE17DuUGh64t9RkQ6iA. I have included the SkyWire.Pos.Ordering one as well since it is working correctly, the comparison might help. I've checked these files myself but couldn't find anything that stood out, hopefully you'll see something I can't.
Thanks again!
In case this helps, I noticed that the files shows up as brown even though the “Include non-solution items” is unchecked up above in the search window.
Hi Tylersyme!
Thank you for the details! I've created an issue for further investigation. We are not sure the cause of the issue yet and need some more information from you. Please collect the full log bundle. You can upload it directly to the YouTrack issue or use our server once again and share the new ID. Please also check the following:
- find the
.dotsettings
file near a solution file and check if any of affected files are present there- try to open any of the affected files in the editor and press "Alt+Ctrl+shift+8" to enable analysis.
Please also attach
dotsettings
file along with the results of the check.Thank you for your patience!
Thank you Alexandra, I've uploaded the log zip directly to the YouTrack issue.
I checked the .DotSettings.user file and don't recognize any of the affected files. I've uploaded that file in case someone wants to look at it 2024_01_17_cSZWaPGbpTqosUM4ADU9ot
I tried "Alt+Ctrl+shift+8" with one of the problematic files and it seems to toggle some of the syntax highlighting? Here's a before and after image. Thank you
Hi Tyler,
Thank you for the logs!
Unfortunately, we need some more information.
You can add info the same way as before or attach it directly to the YouTrack issue.
Thank you for your patience!
I wasn't able to find an action specifically called Reload project and show logs but I went ahead and restarted rider to reset the logs and then reloaded one of the problematic projects afterwards and then retrieved the logs. I've uploaded those new logs to the issue. The name of the project I reloaded is SkyWire.Pos.Module.Orders.
There is a large list of affected files since every file in the reloaded project is affected, but here are a few
OrderManager, OrderExtensions, OrderPreviewView.xaml.cs, SaleFactory, OrderRequester, OrderCreationManager, IOrderRequester, AssemblyInfo, app.config
All of these files are brown colored and do not reformat on save, however all have code highlighting. There is no OFF in the top right of the editor unless I use the "Alt+Ctrl+shift+8" to turn analysis off manually. Even when I add a new file using Rider the color of the file is brown (and syntax highlighting behaves normally)
Thank you for your time! Let me know if you need anything else to help debug this
Hi Tyler!
Thanks a lot for the details. I apologize for the not full steps on how to reload project with logs. This action is available in internal mode only and it collects a completely different type of log. Would you be so kind to try once again? For this
Thank you for your collaboration and sorry again.
No problem,
That worked and I have uploaded the .binlog file of that reloaded project to the issue. Same project as before so the files I gave should be in there.
Once again let me know if you need any more debugging help, thank you.
Are there any workarounds or updates on this?
I've been experiencing the same issue in all 200 projects of a solution. Some devs on my team are experiencing this as well but other devs are not so it seems to be a localized issue. Just wanted to check in and see if there is a solution coming.
Hi Matt Zawislak!
Several different reasons could cause this issue. Could you please contact us via Help | Report a bug with logs attached so we can take a closer look at your particular case? Thanks!
I can confirm this happens also to me in multiple projects. I didn't have these sorts of issues in prior versions of Rider. Probably you put too much AI in your products now…
Hello Sebastian,
We would appreciate it if you could report your issue to our tracker via Help | Report a bug, so that we can take a dedicated look at it.
Have a nice day!
Dmitry Kazantsev I appreciate the need, and I can report a bug, however I'm not always at liberty to provide necessary files without significant work on my part. I would recommend that you attempt to reproduce especially with complex multi-project CLR/CLI solutions, as that is where I see the problem most often.
Hello Sebastian,
Unfortunately, we can't be sure what is the reason for the issue you experience, because such an issue might be caused by different reasons.
So, that, if you could share the initial information about the specific issue you encounter (report a bug or submit a support request), we could investigate it further. Additionally, we would appreciate it if you could share several screenshots that demonstrate the issue.
The possible option you can try is to check the casing in project model dump, .csproj and .sln files:
Have a nice day!