Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Typescript/Resharper 9. Duplicate identifier

I get a lot of "Duplicate identifier" errors in Visual Studio 2013 which make my code unreadable since I installed Resharper 9.

Duplicate identifier

The only reason I can see that there are duplicate errors, is that in another project, these files are included and thus compiled another time. But it should not interfere. Even when I unload the "dependent" project, I still get these annoying highlighting errors. IPosition is not only the only one affected, ILabel, ILabelExample, etc. all got the same error on all fields.

These errors are highlighted in the code, but not in the error list - and compilation is fine.

Related questions:

  • (Unanswered): Multiple Typescript modules without duplicate identifier errors

What setting should I change to make them disappear? Thank you for helping.

like image 973
Mikaël Mayer Avatar asked Feb 02 '15 08:02

Mikaël Mayer


2 Answers

Try checking the bin folder. It can contain .ts files and it generates duplication. You need to add the bin folder to the exclusion list. Something like this:

....
"exclude": [
    "node_modules",
    "wwwroot/lib",
    "bin"
  ]
....
like image 36
VitalickS Avatar answered Sep 27 '22 01:09

VitalickS


This is fixed in ReSharper 2016.2.

like image 68
Doug Domeny Avatar answered Sep 24 '22 01:09

Doug Domeny