As stated above, these files are auto-generated. When the problem is in an auto-generated file it's because something has confused the compiler somehow.
I've encountered situations where one of the *.g.i.cs files is the source of a compilation error. In my case, the issue had to do with the *.g.i.cs files referencing a library that was no longer correct (e.g. after upgrading to a new version of the library, even when the project references are correct and the 'use specific version' flag is true). In my case, the only way that I've found to resolve the issue is to remove the reference to the old assembly, attempt to recompile the solution (it won't build, but it'll help the compiler to realize that it needs to revise it's reference to the assembly), then re-add the correct project reference and recompile the solution. There may be a better way of doing this (neither running a 'Clean solution' nor manually purging the contents of the build folders has worked for me).
You mentioned that you're only having this problem with some of your projects. Try to figure out what the broken ones (or alternatively, the working ones) have in common. If you're encountering the same problem that I did, then I suspect that you have references to one or more libraries that have changed, and the compiler hasn't revised it's view of the landscape to correctly account for the change.