Home VS2017/Resharper2017 "cannot resolve tag" for custom angular2 components in cshtml pages
Reply: 0

VS2017/Resharper2017 "cannot resolve tag" for custom angular2 components in cshtml pages

michn
1#
michn Published in 2017-09-10 20:24:12Z

I am creating my first Angular2 (4) app in Visual Studio 2017 Community Edition with Resharper Ultimate 2017.2.

I have created a number of custom angular components with valid selectors such as "my-app", but whenever I reference these components like <my-app></my-app> in a CSHTML page i get Cannot resolve tag 'my-app' warning in Resharper.

I have enabled Angular 2.x support for HTML pages in Resharper under Options -> Code Editing -> HTML -> JavaScript and Frameworks and this fixed the problem in my HTML angular templates, but not for my CSHTML pages used by MVC.

Note that when I run the application everything works fine, so it is purely a matter of Resharper static analysis identifying it as a false positive warning.

Is there anyway to work around this and make Resharper understand these tags in CSHTML pages too?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.318982 second(s) , Gzip On .

© 2016 Powered by cudou.com design MATCHINFO