Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

RazorHosting IDE intellisense

$
0
0
RazorHosting IDE intellisense
.NET Development
RazorHosting IDE intellisense
May. 13, 2013
02:22 am
3S80537X9Show this entire thread in new window
Gratar Image based on email address
From:Richard Norris
To:All
Hi all,

I'm following Rick's fantastic article on Razor hosting and I love the work he has put into supporting the use of it more appropriately. I've included the project in one of my solutions in an attempt to use the StringHostContainer to render my templates. It all seems to work like a charm apart from the fact I am struggling with getting the intelli-sense to work with the templates.

I managed to get some of the intelli-sense working by adding a web.config file. I am able to reference an external assembly of mine and the intelli-sense can see the CustomContext OK now but without the inherits statement which means it doesn't know what Context is. The problem is I cannot the IDE to load and see the RazorHosting assembly in order to see this, trying to include the namespace results in an IDE warning. The IDE complains about not being able to find or load it or one of its dependencies. I checked I included the RazorHosting assembly in the project and made it copy local, then I added the System.Web.Razor assembly and did the same but then the error for the RazorHosting assembly changed to the System.Web.Razor assembly instead. What are its dependencies? What do I need in my web.config file? I just don't know? Below is my web.config, it is essentially thrown together, I have no idea how MVC stuff should be configured, I've hacked in the assembly references (not full names) is this my problem? I'm assuming I am missing other assembly references from this file and my project. Here is the web config:

<?xmlversion="1.0"?><configuration><configSections><sectionGroupname="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"><sectionname="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /><sectionname="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /></sectionGroup></configSections><system.web.webPages.razor><host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /><pages pageBaseType="System.Web.Mvc.WebViewPage"><namespaces><add namespace="System.Web.Mvc" /><add namespace="System.Web.Mvc.Ajax" /><add namespace="System.Web.Mvc.Html" /><add namespace="System.Web.Routing" /><add namespace="RazorHosting" /><add namespace="InternalResourceHttpServer" /></namespaces></pages></system.web.webPages.razor><system.web><compilation targetFramework="4.0"><assemblies><add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /><add assembly ="System.Web.Razor" /><add assembly="RazorHosting" /><add assembly="InternalResourceHttpServer" /></assemblies></compilation></system.web></configuration>

Here are my project references:

InternalResourceHttpServer
Microsoft.CSharp
RazorHosting
System
System.Core
System.Data
System.Data.DataSetExtensions
System.Web.Razor
System.Xml
System.Xml.Linq

Just going over this now, I'm certain I'm missing some ASP.NET assemblies here, just not sure which ones? Its not critical to have the intellisense as the templates appear to work but it would be nice to have it functioning correctly. Any advice would be greatly appreciated.

TIA

Richard


Viewing all articles
Browse latest Browse all 10393

Trending Articles