g.pickardou
g.pickardou

Reputation: 35913

ReSharper TypeScript seems to be not working at all in my VS 2015 installation

ReSharper TypeScript seems to be not working at all in my VS 2015 installation. Despite of the correctly placed TypeScript definitions ReSharper does not recognize the defined types, gives zillion red underlines, and of course intellisense does not work on the variables.

The error message is for example: Could not find symbol 'JQuery'

Some more diagnostics:

Any ideas?

enter image description here

Upvotes: 33

Views: 6357

Answers (3)

Manfred
Manfred

Reputation: 5666

Since the problem occurs in more than one version including latest as of writing, you also have the option to switch off TypeScript support in ReSharper. After all, if a feature is broken, why use it?

How to switch it off according to their web site:

If necessary, you can disable/enable ReSharper features in TypeScript files by clearing the corresponding check box on the Environment | Products & Feature page of ReSharper options.

Source: JetBrains help page for ReSharper (retrieved 29 March 2018)

After this change you may have to restart Visual Studio for the new settings to take effect.

Upvotes: 4

Bryan Rayner
Bryan Rayner

Reputation: 4330

I have found that sometimes, the Visual Studio Project file is corrupted, containing multiple references to .ts files. This can cause a different, but related error, where ReSharper thinks there are multiple declarations of a symbol.

To resolve, if you are using version control, it is simple.

  • Make a commit
  • Delete the folder containing the duplicated files
  • Revert changes to the repository
  • Add the folder back to Visual Studio
  • Save the project file

As I mentioned, this doesn't solve the original problem, but can help in situations where ReSharper reports duplicate symbols.

Upvotes: 1

citizenmatt
citizenmatt

Reputation: 18583

If you see this kind of behaviour - lots of red, but clean compile, especially after an upgrade - you should try to clean the caches. Go to ReSharper → Options → General → Clean caches, then restart Visual Studio.

Upvotes: 78

Related Questions