irihitech / Semi.Avalonia

Avalonia theme inspired by Semi Design
https://irihitech.github.io/Semi.Avalonia/
MIT License
1.02k stars 66 forks source link

Internal compiler error while transforming node XamlX.Ast.XamlAstObjectNode #373

Closed jinleil closed 3 months ago

jinleil commented 4 months ago

通过Avalonia C# Project模板创建的新项目,只要修改了App.axaml文件就提示下面这个错误: Internal compiler error while transforming node XamlX.Ast.XamlAstObjectNode: XamlX.XamlTypeSystemException: Unable to resolve type Avalonia.Data.RelativeSource at XamlX.TypeSystem.XamlTypeSystemExtensions.GetType(IXamlTypeSystem sys, String type) at Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers.AvaloniaXamlIlWellKnownTypes..ctor(TransformerConfiguration cfg) at Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers.AvaloniaXamlIlWellKnownTypesExtensions.GetAvaloniaTypes(AstTransformationContext ctx) at Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers.XDataTypeTransformer.Transform(AstTransformationContext context, IXamlAstNode node) at XamlX.Transform.AstTransformationContext.Visitor.Visit(IXamlAstNode node) Line 1, position 2. AvaloniaApplication2 C:\Users\36388\source\repos\AvaloniaApplication2\AvaloniaApplication2\Views\MainView.axaml 1

但是build是成功的,也可以成功运行,就是无法预览

我的环境如下: VS2022 Avalonia 11.0.2 Semi.Avalonia 11.0.1 .NET 7.0

rabbitism commented 4 months ago

这个问题在Avalonia11.0.8,semi11.0.7后已经修复

jinleil commented 4 months ago

你好,我已经将Avalonia升级到了11.0.11,Semi.Avalonia升级到了11.0.7.4,设计器确实不报错误了,但是还是不能预览。我升级完成后清理了解决方案并重新生成了还是不行