0

What is "_MINIPROFILER UPDATED Layout.cshtml" and why does it keep giving me problems why I try to build?

"The name 'ViewBag' does not exist in the current context" _MINIPROFILER UPDATED Layout.cshtml

"The name 'Url' does not exist in the current context" _MINIPROFILER UPDATED Layout.cshtml

I didn't generate these views so I don't know how to control what's in them. Must be an easy answer out there.

Don Zacharias
  • 1,544
  • 2
  • 14
  • 31

1 Answers1

0

The '_MINIPROFILER UPDATED Layout.cshtml' file is generated when you add MiniProfiler to your project through NuGet. It's an example file; it shows how you might render the MiniProfiler includes (css og js) in your layout. You should grab the @MiniProfiler.RenderIncludes() line and put it into your standard layout file (_Layout.cshtml), then delete the '_MINIPROFILER UPDATED Layout.cshtml' file.

janerist
  • 36
  • 1
  • 1