Henrik Elkjær Hagen - 488 - Feb 12, 2014

I just created a new project in VS 2013 by selecting ASP.Net Web Application then “Empty project”. This project is now targeting .net 4.5. I then added the ServiceStack.Razor package from nuget, which in turn downloaded all needed packages. Then I look at the Web config and wonder why it references  "System.Web.WebPages.Razor, Version= and “System.Web.Mvc, Version=”. Shouldn’t this be mvc 4.0 or 5.0 and razor 2.0 or 3.0?
What I’m trying to accomplish is getting rid of a warning in the Visual studio page inspector saying “No mapping data was returned from the server”.

https://www.nuget.org/packages/ServiceStack.Razor doesn’t have any dependencies other than ServiceStack, it includes its own version of System.Web.Razor.

Note: you can’t use SS.Razor inside an MVC project, see: http://stackoverflow.com/a/21657346/85785

Henrik Elkjær Hagen:

Can I even use the Page Inspector in visual studio when creating a pure SS.Razor project? 
Looking at this page, I think it requires normal razor v2. http://msdn.microsoft.com/en-us/library/jj204395.aspx

What Page Inspector? Chrome?
What was the empty application you’re creating? An ASP.NET (i.e. not MVC) Web App?

Henrik Elkjær Hagen:

The built-in page inspector in visual studio 2013. Yes an empty ASP.Net Web app.

I doubt the Page Inspector will work since SS.Razor uses its own, completely different Razor Engine from MVC.
But I’ve just created an empty .NET 4.5 web application and it works fine, and it references the v3.0 of Razor in the project references. 
Don’t worry about what it says in the Web.config, that’s mainly to keep VS.NET intelli-sense happy, the <buildProvider/> says to use our Razor engine. Other than that we only use the namespaces specified in <system.web.webPages.razor>.

Note: the .NET 4.0 and .NET 4.5 versions of SS.Razor are different, so if you downloaded the NuGet packages whilst the project was .NET 4.0 than it would pull in the .NET v4.0 version.
I would re-create your app as a .NET 4.5 Web App and installing from NuGet again.

Henrik Elkjær Hagen:

Thanks alot! This made things clearer for me.