我正在从头开始构建ASP.NET Web应用程序。我在Index.cshtml
文件中添加了“ asp-prerender-data”,这是正常的。 JavaScript未加载,仅在网页上显示“正在加载...”。
VS代码现在正在填充以下错误:
{
"resource": "/c:/Users/david/OneDrive/workspace/Prerendering/Views/Home/Index.cshtml__virtual.cs",
"owner": "csharp",
"severity": 8,
"message": "The namespace 'AspNetCore' already contains a definition for 'Views_Home_Index' (CS0101) [Prerendering]",
"startLineNumber": 14,
"startColumn": 18,
"endLineNumber": 14,
"endColumn": 34
}
<app id="spa" asp-prerender-module = "ClientApp/boot-server" asp-prerender-data=" new { IsAdministrator = true, cookies = ViewContext.HttpContext.Request.Cookies}">
Loading...
</app>