wieslawsoltes/Dock

After upgrading to Dock 11.0.x, get error CSC : error AXN0002

uxmal opened this issue · 6 comments

uxmal commented

I'm porting my Avalonia application from 0.10 to 11. Everything is compling, except for a single error from the C# compiler. The full message is:

CSC : error AXN0002: XamlX.XamlParseException: Unable to resolve type DockProperties from namespace using:Dock.Avalonia Line 1, position 2.

I don't have any reference to the DockProperties class anywhere in my code. In addition, the C# compiler doesn't tell me in which file the error is being found, so I have do idea where to go look for the problem. What am I doing wrong?

The project's code is here:
https://github.com/uxmal/reko.git
The relevant branch is avalonia-11
The relevant source files are in this directory:
https://github.com/uxmal/reko/tree/avalonia-11/src/UserInterfaces/AvaloniaUI

uxmal commented

Thanks for the feedback. I'm not sure what you're implying, however. The package reference is to the most recent available Nuget on nuget.org: <PackageReference Include="Dock.Model.ReactiveUI" Version="11.0.0-preview6" />. The error reproduces on my CI build, so it doesn't appear to me a machine-specific issue:
https://cirrus-ci.com/task/6006447935324160

Are you suggesting:

  • Removing the reference? I did, the compiler error persists and more compiler errors appear as the code uses extension methods from Dock.Model.ReactiveUI
  • To use a non-prerelease package? If so, where is it available from? According to nuget.org this is the most recent available binary.
  • To use a different package? If so, which one?

After doing a clean rebuild, I get the following stack trace together with my diagnostic. Is it of any help?

Severity	Code	Description	Project	File	Line	Suppression State
Error	AXN0002	XamlX.XamlParseException: Unable to resolve type DockProperties from namespace using:Dock.Avalonia Line 1, position 2.
   at XamlX.Transform.Transformers.TypeReferenceResolver.ResolveTypeCore(AstTransformationContext context, String xmlns, String name, Boolean isMarkupExtension, List`1 typeArguments, IXamlLineInfo lineInfo, Boolean strict) in /_/src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/src/XamlX/Transform/Transformers/TypeReferenceResolver.cs:line 109
   at XamlX.Transform.Transformers.TypeReferenceResolver.ResolveType(AstTransformationContext context, String xmlns, String name, Boolean isMarkupExtension, List`1 typeArguments, IXamlLineInfo lineInfo, Boolean strict) in /_/src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/src/XamlX/Transform/Transformers/TypeReferenceResolver.cs:line 35
   at XamlX.Transform.Transformers.TypeReferenceResolver.ResolveType(AstTransformationContext context, XamlAstXmlTypeReference xmlref, Boolean strict) in /_/src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/src/XamlX/Transform/Transformers/TypeReferenceResolver.cs:line 147
   at XamlX.Transform.Transformers.TypeReferenceResolver.Transform(AstTransformationContext context, IXamlAstNode node) in /_/src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/src/XamlX/Transform/Transformers/TypeReferenceResolver.cs:line 136
   at XamlX.Transform.AstTransformationContext.Visitor.Visit(IXamlAstNode node) in /_/src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/src/XamlX/Transform/AstTransformationContext.cs:line 58
   at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor) in /_/src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/src/XamlX/Ast/Common.cs:line 56
   at XamlX.Ast.XamlAstNamePropertyReference.VisitChildren(IXamlAstVisitor visitor) in /_/src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/src/XamlX/Ast/Xaml.cs:line 137
   at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor) in /_/src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/src/XamlX/Ast/Common.cs:line 60
   at XamlX.Ast.XamlAstXamlPropertyValueNode.VisitChildren(IXamlAstVisitor visitor) in /_/src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/src/XamlX/Ast/Xaml.cs:line 58
   at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor) in /_/src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/src/XamlX/Ast/Common.cs:line 60
   at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor) in /_/src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/src/XamlX/Ast/Common.cs:line 74
   at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor) in /_/src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/src/XamlX/Ast/Common.cs:line 60
   at XamlX.Compiler.XamlCompiler`2.Transform(XamlDocument doc, Boolean strict) in /_/src/Markup/Avalonia.Markup.Xaml.Loader/xamlil.github/src/XamlX/Compiler/XamlCompiler.cs:line 71
   at Avalonia.Generators.Common.XamlXViewResolver.ResolveView(String xaml) in /_/src/tools/Avalonia.Generators/Common/XamlXViewResolver.cs:line 48	AvaloniaUI	D:\dev\uxmal\reko\master\src\UserInterfaces\AvaloniaUI\AvaloniaUI.csproj	1	Active

The token DockProperties doesn't exist in my codebase. I see it in the Dock.Settings project in your source reposity. There is already a reference to Dock.Settings in my csproj file. Am I making an obvious mistake?

Same issue here. Since updating to 11.0.0.1, it cannot find DockProperties in Dock.Avalonia.

Fixed in 11.0.0.2

It is still not working, same error. Do I need to change something coming from 11.0.0?