Unable to get this sample project to work

Hello,
I’m tring to run this simple sample I’ve created that renders the default.cshtml page but instead of showing the content I’m asked to download the page and I can’t understand why, anyone can help me ?
Thanks

Not sure where you’ve got this VS.NET template from but it’s referencing the MVC and WebPages NuGet packages with their version of Razor which is in conflict with ServiceStack’s Razor support.

You need to either uninstall all MVC/WebPages NuGet packages, so what you’re left with is:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.1" targetFramework="net461" />
  <package id="Microsoft.Net.Compilers" version="1.3.2" targetFramework="net461" developmentDependency="true" />
  <package id="ServiceStack" version="4.0.60" targetFramework="net461" />
  <package id="ServiceStack.Client" version="4.0.60" targetFramework="net461" />
  <package id="ServiceStack.Common" version="4.0.60" targetFramework="net461" />
  <package id="ServiceStack.Interfaces" version="4.0.60" targetFramework="net461" />
  <package id="ServiceStack.OrmLite" version="4.0.60" targetFramework="net461" />
  <package id="ServiceStack.Razor" version="4.0.60" targetFramework="net461" />
  <package id="ServiceStack.Text" version="4.0.60" targetFramework="net461" />
</packages>

After uninstalling the MVC Nuget packages I also uninstalled/reinstalled the ServiceStack.Razor package to make sure I pulled in ServiceStack’s version of Razor.

This project also has a lot of unused references you don’t need, I’d recommend removing all other references except for:

Alternatively if you want to use MVC’s Razor instead of ServiceStack’s Razor support you’ll need to run ServiceStack and MVC side-by-side.

P.S. please add repro projects in Github repositories as it makes it much easier to browse files without needing to download and setup a new local VS.NET Solution first.