question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SA1300 - '_Page_Views_Shared__Layout_cshtml'

See original GitHub issue

Hi

I’m gettings this warning in my file Views\Shared\_Layout.cshtml

SA1300	Element '_Page_Views_Shared__Layout_cshtml' must begin with an uppercase letter.

I understand the rule, but i tried including this line on the top of the file with no success.

// <auto-generated />
<!DOCTYPE html>   ...

(This isn’t working, I guess because the view is compiled and thats is not thr first line)

@{
// <auto-generated />
}
Microsoft .NET Core Shared Framework Host
  Version  : 1.1.0
  Build    : 928f77c4bc3f49d892459992fb6e1d5542cb5e86

Windows 7 x64
Visual Studio 2017

Thanks in advance… 😃

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
rynowakcommented, Jun 28, 2017

FYI for anyone watching this, this will be fixed in a later preview of Visual Studio 2017 15.3

0reactions
rynowakcommented, Jun 20, 2017

FYI we are tracking this feedback on Razor at aspnet/Razor#1449

Read more comments on GitHub >

github_iconTop Results From Across the Web

The layout view '~/Views/Shared/_Layout.cshtml' could not ...
cshtml, I have specified the path to the layout which I want to apply to the entire application but I keep getting the...
Read more >
The layout page "~/Views/Shared/_Layout.cshtml" could ...
I got this error and I can't figure out what is going on. I am positive the _layout.cshtml resides in the shared folder...
Read more >
Layout in ASP.NET Core
Learn how to use common layouts, share directives, and run common code before rendering views in an ASP.NET Core app.
Read more >
What is Layout View in ASP.NET MVC
Layout views are shared with multiple views, so it must be stored in the Shared folder. By default, a layout view _Layout.cshtml is...
Read more >
(#8) Layout file explanation | _Layout.cshtml in .NET 6
In this session, we will go through the complete explanation of _Layout. cshtml file in ASP MVC .NET 6. Layout is a very...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found