My code looks like this:
我的代码是这样的:
<!DOCTYPE html>
<html lang="en"
class="light"
ng-app="app"
ng-controller="appController"
id="ngApp"
xmlns:ng="http://angularjs.org"
xmlns:ui="ui-router">
In Visual Studio 2013 this always gives a problem in the editor and the DOCTYPE is underlined in green with a message saying:
在Visual Studio 2013中,这总是会给编辑器带来问题,文档类型以绿色下划线,并带有一条消息:
Document Type Declaration must appear only once
Has anyone else found a solution to this problem. Note that with a simple <html>
this does not happen. Code works in the browser but for all versions of VS2013 Update 1-4 I see this green squiggly line under DOCTYPE.
有人找到解决这个问题的办法了吗?注意,使用简单的不会发生这种情况。代码可以在浏览器中工作,但是对于所有版本的VS2013更新1-4,我在DOCTYPE下看到这条绿色的曲线。
1 个解决方案
#1
4
Check and see if there is a layout file. If you using the template for MVC that Visual Studio provides then your layout file will be located at Views/Shared/_Layout
. There you can see that <!DOCTYPE html>
has already been inserted.
检查是否有布局文件。如果您使用Visual Studio提供的MVC模板,那么您的布局文件将位于view /Shared/_Layout。在那里你可以看到 。
#1
4
Check and see if there is a layout file. If you using the template for MVC that Visual Studio provides then your layout file will be located at Views/Shared/_Layout
. There you can see that <!DOCTYPE html>
has already been inserted.
检查是否有布局文件。如果您使用Visual Studio提供的MVC模板,那么您的布局文件将位于view /Shared/_Layout。在那里你可以看到 。