ToB企服应用市场:ToB评测及商务社交产业平台

标题: 记录一次.NET6环境使用Visual Studio 2022 V17.6.2版本的异常 [打印本页]

作者: 一给    时间: 2023-6-7 17:58
标题: 记录一次.NET6环境使用Visual Studio 2022 V17.6.2版本的异常
开发环境

C#开发环境Visual Studio 2022 V17.6.2版本。
目标框架:

.NET 6.0
错误内容:

系统是Blazor Server框架的系统页面,在使用Visual Studio 2022 V17.6.2版本编译后,执行出现:
  1. TimeStamp: 2023/6/6 13:35:07
  2. MachineName: Light.Yang
  3. AppDomainName: SajetServerApp
  4. OS: Microsoft Windows 10.0.18363
  5. OSArchitecture: X64
  6. ProcessArchitecture: X64
  7. Framework: .NET 6.0.16
  8. UserName: lukel
  9. VSIDE: Microsoft Visual Studio Community 2022 17.0
  10. Message: Unable to set property 'placeholder' on object of type 'Sajet.WebUI.Components.SelectInput`1[[System.String,System.Private.CoreLib,Version=6.0.0.0, Culture=neutral,PublicKeyToken=7cec85d7dea7798e]]'.The error
  11. was: Unable to cast object of type 'MicrosoftExtensions.Localization.localizedString' to type 'System.Strinq'.
  12. **********************************************
  13. StackTrace: at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.g_SetProperty|3_0(Object target,PropertySetter writer,String parameterName,Object value)
  14. at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.SetProperties(ParameterView& parameters, Obiect target)
  15. at Microsoft.AspNetCore.Components.ParameterView.SetParameterProperties(Object target)
  16. at BootstrapBlazor.Components.ValidateBase`1.SetParametersAsync(ParameterView parameters)
  17. at Microsoft.AspNetCore.Components.Rendering.ComponentState.SupplyCombinedParameters(ParameterView directAndCascadingParameters)
复制代码
问题分析过程:

VS 2022版本支持最新框架测试结果Visual Studio 2022 V17.6.2.NET6.0出现异常Visual Studio 2022 V17.5.2.NET7.0正常Visual Studio 2022 V17.4.0.NET6.0正常Visual Studio 2022 V17.2.15.NET6.0正常总结:


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!




欢迎光临 ToB企服应用市场:ToB评测及商务社交产业平台 (https://dis.qidao123.com/) Powered by Discuz! X3.4