Stephen Brannan - 486 - Feb 13, 2014

Somehow I’ve lost my intellisense in the cshtml using ServiceStack.Razer. I’m using VS.Net 2013 and ServiceStack v4.0.5. Any tips on how to get it back? I’ve tried restarting vs.net and building the project, which is successful.

Just to check the Razor config to make sure that it looks similar to what a new ASP.NET project looks like with SS.Razor added.

Otherwise you could try cleaning out the binary cache .suo file and reloading the project.

Stephen Brannan:

I haven’t changed this since I upgraded from 2012. So I don’t think it’s a web.config problem. I’ll try cleaning the bin cache and .suo file.

Stephen Brannan:

Ok tried that, no such luck.

Michał Gajek:

Im curious too, I’ve had the same problem since switching to vs2013

VS.NET intelli-sense is a dark art that’s silently coupled to MVC which we don’t have any control over, the reason why we add MVC Razor Web.config entries is to keep VS .NET intelli-sense happy.
This is why if you’re using self-hosting you still need a dummy Web.config even though your project doesn’t use it, it’s just there for VS.NET’s intelli-sense.
All I can recommend is to check that the MVC Web Razor config looks the same as a new project template. So you could uninstall SS.Razor, remove all the Razor configuration from your web.config than install SS.Razor again.

Is your project .NET 4.0 or 4.5?

Stephen Brannan:

It’s 4.5

So I’d recommend copying over the Razor related Web.config from a new .NET 4.5 ASP.NET project with SS.Razor enabled. 

Stephen Brannan:

Thanks Demis. I’ll try it when I have a chance. Fortunately for me it’s not a big deal since I’m in angularjs or in the service stack services most of the time.

Stephen Brannan:

Ok I tried pulling down the latest RazerRockstars project and opened it in vs.net 2013 and it had the same intellisense problem.