ReSharper not analyzing generated files (objd\amd64\*.g.cs)

I recently upgraded from ReSharper 9 over to 2018.1.1, but I'm having trouble with a bunch of my existing projects that have generated files.  In particular, we have a process that generates files under a temporary folder (for example "\objd\amd64\VariantConfiguration.g.cs").  These files are being ignored for analysis, and as a result, I get red squiglies anywhere in my project that uses these files.  The project builds just fine, and if I select a type defined in the file and F12, it takes me to the right class definition, but because ReSharper isn't analyzing the file, I get no intellisense.

If I manually rename the generated file, removing the ".g", everything works correctly from an analysis perspective.  If I rename a regular file in a normal directory to .g.cs, it still gets analyzed.

Solution wide analysis, as well as using the keyboard shortcut to "EnableDaemon" don't help.  I do have a mask for "*.g.cs" file (so it doesn't give me errors/warnings within the file), but removing this mask does not restore analysis on the file.

1
4 comments

Hello!

 

Thank you for contacting us.

Could you please try clearing caches for the solution - https://resharper-support.jetbrains.com/hc/en-us/articles/206546989-ReSharper-stopped-working-for-a-single-specific-solution and check if the problem is still reproduced?

Thank you.

0
Avatar
Permanently deleted user

Yup, I cleared the cache using ReSharper->Options->Environment->General: Clear caches, but no change.

0

Thank you for the reply.

 

Is there any chance you could provide some sample solution including the files that demonstrate the issue?

We'll be very grateful for that sample.

Thank you.

0
Avatar
Permanently deleted user

This is also happening to me. Clearing the cache does not help. Renaming the file from *.g.cs to *.cs fixes it. Any updates on this?

0

Please sign in to leave a comment.