serlingpa
serlingpa

Reputation: 12690

Angular 2 and Visual Studio 2015 with ReSharper 2016.1

I am developing a webpack Angular 2.0.0-rc.1 application under Mac OS X using Visual Studio Code, but am trying to migrate the editing to Visual Studio 2015 under Parallels. I want to keep the actual build process running in OS X. I am doing this because I have found after several months of use that Visual Studio Code is quite limited.

ReSharper 2016.1 is complaining about a lot of my TypeScript. For instance, it does not like @Component or @RouteConfig, complaining that it cannot resolve the symbols. I have several options - I could disable ReSharper (no), I could disable the inspections (no), ... and so on.

What can I do about this? I have configured ReSharper to use TypeScript 1.8 but I'm not sure what else I can do.

For some reason or other, it can't find the Router class or ROUTER_DIRECTIVES object as defined in the import:

import { RouteConfig, Router, ROUTER_DIRECTIVES } from '@angular/router-deprecated';

They are not hinted in this import, but later on in the code. There are many errors like this, a few too many to enumerate.

Anyone have any success using Angular 2 with Visual Studio 2015 & ReSharper 2016.1?

Upvotes: 5

Views: 875

Answers (1)

JoMendez
JoMendez

Reputation: 884

This is provably not the best solution but it might provides a workaround

Error: Symbol 'X' can not be properly resolved, probably its located in an inaccessible module

Solution: You can disabled resharper’s typescript inspection for now. In VS2015 go to Resharper > Options > Code Inspection > Settings Find ‘File masks’ (bottom right) and add *.ts

With this you will maintain all the resharper functionalities while disable it for TypeScript only

This is the full article on how to install angular 2 seed for VS 2015:

Upvotes: 0

Related Questions