I'm trying to get Intellisense working for razor views in a non-ASP.NET project and would like to understand the relationship between VisualStudio's Razor editor and BuildProviders.
For background, I'm writing a framework on top of Manos (mono web server) that uses Razor for its view engine. I've got that part working perfectly, but Intellisense in VS doesn't work giving a range of errors from unknown types to unregistered build providers, depending on where the output DLL's of the project are placed.
My project is a .NET Class Library, with .cshtml files (build action none). The base razor view class is defined in a separate assembly (outside the project) which could be registered in the GAC, but currently isn't.
I've already read these articles:
- http://www.west-wind.com/weblog/posts/2011/Jan/12/IntelliSense-for-Razor-Hosting-in-nonWeb-Applications
- Need razor view engine auto-complete to work in a class library?
- http://blogs.msdn.com/b/webdevtools/archive/2011/01/20/how-to-get-razor-intellisense-for-model-in-a-class-library-project.aspx
- .NET - Razor outside MVC application - Problems with removing @inherits and providing @model
Sounds like I need to write my own BuildProvider, but can't find any documentation explaining the relationship between a build provider and razor intellisense.