Need razor view engine auto-complete to work in a class library?

前端 未结 5 399
野的像风
野的像风 2020-12-02 08:12

We have a modular architecture where we have some views (cshtml) files in a separate project (class library). How can we get the syntax highlighting and autocomp

5条回答
  •  眼角桃花
    2020-12-02 08:57

    Alright, this is a longshot, but I ran across the same problem. Are you using JetBrains Resharper?

    Resharper overrides VS's intellisense engine but it doesn't understand Razor syntax. You simply have to tell VS to rely on its own intellisense rather than Resharper's.

    In VS2010, go Resharper - Options - Intellisense - General. Then check the Visual Studio radio button.

    Worked great for me.

提交回复
热议问题