I am opening the same MVC solution in VS2013 and VS2015RC, exact same code, but my VS2015RC tells me there are bunch of errors on my .cshtml pages where as VS2013 says no errors. The main problem is I don't get any intellisense because of the errors in VS2015.
What could be causing this? Also, when I Build the solution in VS2015, it says it succeeded? Code snippet:
<!DOCTYPE html>
<html>
<head>
<title>@ViewBag.Title</title>
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-2.1.3.min.js")" type="text/javascript"></script>
<meta name="description" content="The description of my page" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div id="header">
<div class="title">ABC</div>
</div>
<div id="categories">
@{ Html.RenderAction("Menu", "Navigation"); }
</div>
<div id="content">
@RenderBody()
</div>
</body>
</html>
vs2013 vs2015
try add this line inside each .cshtml
@inherits System.Web.Mvc.WebViewPage<dynamic>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With