Razor Intellisense and ReSharper
Choosing the type of Intellisense
ReSharper has two options when it comes to Intellisense. You can either continue to use the default Visual Studio Intellisense or use the enhanced ReSharper Intellisense. This is something that can be configured under ReSharper –> Options –> Intellisense –> General.
Since we currently do not support Razor what happens is that when inside a CSHTML file (Razor’s View Files), ReSharper doesn’t “understand” it and therefore does not automatically invoke Intellisense. However, you can work around this by manually invoking Intellisense. This is done by pressing Ctrl+Space:
Using this option, you continue to get the benefits of ReSharper enhanced Intellisense inside Visual Studio, and have default Visual Studio Intellisense inside Razor files. However, you do need to manually invoke it.
If you are not comfortable with this option, you can revert back to using Visual Studio’s Intellisense. All you need to do is select this option under the configuration displayed previous. This will then automatically invoke Intellisense for Razor files without the need to press Ctrl+Space. You can then manually invoke ReSharper Intellisense with Ctrl+Alt+Space
If Intellisense still does not work for you despite these two workarounds, make sure you have not associated the CSHTML files with an incorrect editor. Prior to RC of MVC 3, many users have been using HTML Editor as the default editor for CSHTML, which enabled them to get basic HTML Intellisense and Syntax highlighting. If you still have this option set, make sure you set it to use the new Razor Editor. To do this, right click on any CSHTML file and click on Open With, choosing Razor Editor
Doing this should enable Intellisense inside Razor for you, and you continue to get the full benefits of ReSharper outside of Razor.
If you continue to have any issues with Intellisense, please leave a comment or contact us via the forums or Twitter. And don’t forget you can learn more about ReSharper and our other tools at JetBrains TV
Subscribe to Blog updates
Thanks, we've got you!
Eager, Lazy and Explicit Loading with Entity Framework Core
Entity Framework Core (EF Core) supports a number of ways to load related data. There’s eager loading, lazy loading, and explicit loading. Each of these approaches have their own advantages and drawbacks. In this post, let’s have a quick look at each of these ways to load data for navigational prope…
OSS Power-Ups: bUnit – Webinar Recording
The recording of our webinar, OSS Power-Ups: bUnit, with Egil Hansen and Steven Giesel, is available. This was the twelfth episode of our OSS Power-Ups series, where we put a spotlight on open-source .NET projects. Subscribe to our community newsletter to receive notifications about future webi…
Accelerating Your Testing Workflow with Unit Test Creation and Navigation
Unit tests play an important role in our daily development workflow. They help us ensure our codebase's correctness when writing new functionality or performing refactorings to improve readability and maintainability. In the process, we often create new test files that accompany the p…
Introducing Predictive Debugging: A Game-Changing Look into the Future
With the introduction of debugging tools, software developers were empowered to interactively investigate the control flow of software programs to find bugs in live environments. At JetBrains, we've always strived to improve the art of debugging. Besides the more standard things you expect from a de…