【发布时间】:2023-01-14 07:58:17
【问题描述】:
当我在 VS2022 中打开一个 .cshtml 文件时,其中嵌套了 taghelpers,该文件的格式不起作用,我在输出中出现以下错误Razor 语言服务器客户端.
Warning: OmniSharp.Extensions.LanguageServer.Server.Configuration.DidChangeConfigurationProvider: No ConfigurationItems have been defined, configuration won't surface any configuration from the client! |
Error: Microsoft.AspNetCore.Razor.LanguageServer.Semantic.DefaultRazorSemanticTokensInfoService: Error thrown while retrieving CSharp semantic range - OmniSharp.Extensions.JsonRpc.Server.JsonRpcException: 'end' must not be less than 'start'
Parameter name: end
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at OmniSharp.Extensions.JsonRpc.ResponseRouter.ResponseRouterReturnsImpl.<Returning>d__4`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Razor.LanguageServer.Semantic.DefaultRazorSemanticTokensInfoService.<GetMatchingCSharpResponseAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Razor.LanguageServer.Semantic.DefaultRazorSemanticTokensInfoService.<GetCSharpSemanticRangesAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Razor.LanguageServer.Semantic.DefaultRazorSemanticTokensInfoService.<GetSemanticTokensAsync>d__10.MoveNext() |
一旦我开始输入新的 html 元素,智能感知就会起作用,但属性是纯黑色的。我在这里找到了一些相关信息:https://developercommunity.visualstudio.com/t/vs-2022-razor-editor-not-formatting-html/1625350
嵌套的 taghelper 是 kendo-grid。我已经向开发人员提出了一张票,他们无法复制它。
有没有人有类似的东西?
【问题讨论】:
标签: visual-studio-2022 tag-helpers asp.net-core-tag-helpers