C# 我在运行Blazor网站时出现formlayout错误

C# 我在运行Blazor网站时出现formlayout错误,c#,asp.net-core,error-handling,blazor,circuit,C#,Asp.net Core,Error Handling,Blazor,Circuit,我更新了VisualStudio19,在此之前,我的网站完全按照我的预期运行。现在我在加载主页时出错,但在加载完成之前就中断了。我在下面提供了错误代码。我还想让你知道,我看过这篇文章()并尝试了所有的方法,但都没有成功 Information: Normalizing '_blazor' to 'http://fakesite.com/_blazor'. Error: There was an unhandled exception on the current circuit, so th

我更新了VisualStudio19,在此之前,我的网站完全按照我的预期运行。现在我在加载主页时出错,但在加载完成之前就中断了。我在下面提供了错误代码。我还想让你知道,我看过这篇文章()并尝试了所有的方法,但都没有成功

Information: Normalizing '_blazor' to 
'http://fakesite.com/_blazor'.

Error: There was an unhandled exception on the current circuit, so this 
circuit will be terminated. For more details turn on detailed exceptions in 
'CircuitOptions.DetailedErrors'

Information: Connection disconnected.
实施Hanks解决方案后出现的新错误

Error: Microsoft.JSInterop.JSException: Could not find 'FormLayout' in 'window.DxBlazor'.
Error: Could not find 'FormLayout' in 'window.DxBlazor'.
    at http://fakesite.com/_framework/blazor.server.js:8:27768
    at Array.forEach (<anonymous>)
    at d (http://fakesite.com/_framework/blazor.server.js:8:27729)
    at http://fakesite.com/_framework/blazor.server.js:8:28342
    at new Promise (<anonymous>)
    at e.beginInvokeJSFromDotNet (http://fakesite.com/_framework/blazor.server.js:8:28316)
    at http://fakesite.com/_framework/blazor.server.js:1:19148
    at Array.forEach (<anonymous>)
    at e.invokeClientMethod (http://fakesite.com/_framework/blazor.server.js:1:19119)
    at e.processIncomingData (http://fakesite.com/_framework/blazor.server.js:1:17165)
   at Microsoft.JSInterop.JSRuntimeBase.InvokeWithDefaultCancellation[T](String identifier, IEnumerable`1 args)
   at Microsoft.AspNetCore.Components.Rendering.Renderer.GetErrorHandledTask(Task taskToHandle)
错误:Microsoft.JSInterop.JSException:在“window.DxBlazor”中找不到“FormLayout”。
错误:在“window.DxBlazor”中找不到“FormLayout”。
在http://fakesite.com/_framework/blazor.server.js:8:27768
在Array.forEach()处
在d(http://fakesite.com/_framework/blazor.server.js:8:27729)
在http://fakesite.com/_framework/blazor.server.js:8:28342
在新的承诺()
在e.beginInvokeJSFromDotNet(http://fakesite.com/_framework/blazor.server.js:8:28316)
在http://fakesite.com/_framework/blazor.server.js:1:19148
在Array.forEach()处
在e.invokeClientMethod(http://fakesite.com/_framework/blazor.server.js:1:19119)
在e.processIncomingData(http://fakesite.com/_framework/blazor.server.js:1:17165)
在Microsoft.JSInterop.JSRuntimeBase.InvokeWithDefaultCancellation[T](字符串标识符,IEnumerable`1参数)
位于Microsoft.AspNetCore.Components.Rendering.Renderer.GetErrorHandledTask(Task taskToHandle)
这是CreateWebHostBuilder方法

public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
     WebHost.CreateDefaultBuilder(args)
     .UseSetting(WebHostDefaults.DetailedErrorsKey, "true")
     .CaptureStartupErrors(true)
     .UseStartup<Startup>();
公共静态IWebHostBuilder CreateWebHostBuilder(字符串[]args)=>
WebHost.CreateDefaultBuilder(args)
.UseSetting(WebHostDefaults.DetailedErrorKey,“true”)
.CaptureStartupErrors(真)
.UseStartup();

从字面上接受建议开始

在Startup.ConfigureServices中:

services.AddServerSideBlazor().AddCircuitOptions(options => { options.DetailedErrors = true; });

然后把结果贴在这里

更新visual Studio后,我所有的NuGet软件包也都升级了。这包括DevExpress for Blazor NuGet软件包,更新后,他们更改了到dx-Blazor.js和dx-Blazor.css文件的链接,您应该将这些文件放在布局的标题部分

发件人:


致:



希望这可能对我的处境或与我类似的处境中的其他人有所帮助。

似乎这是一个与客户端脚本相关的问题。如果您在消息中看到“window.DxBlazor”,这意味着您需要在客户端脚本中查找原因。请确保项目中包含最新的DevExpress脚本。 见本段第6项。  

你能发布你的
CreateWebHostBuilder
方法代码吗?嘿@MindSwipe,我已经在我的帖子中添加了方法。你是否使用最新版本的.NET Core 3.0 Preview 8?最新的VisualStudio2019更新是针对Preview 8的。可能是.NET核心版本控制问题。嘿@PascalR,我使用的是最新版本的.NET Core 3.0 Preview 8。您发布的内容还可以,但是主机呢?是否启用了WebSocket?如何部署(是否自包含?)
<link href="lib/dx-blazor.css" rel="stylesheet" />
<script src="lib/dx-blazor.js"></script>
<link href="lib/dx-blazor/dx-blazor.css" rel="stylesheet" />
<script src="lib/dx-blazor/dx-blazor.js"></script>