Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always getting NullReferenceException from UpdateXamlResultMessage #416

Open
tkefauver opened this issue Nov 11, 2023 · 3 comments
Open
Labels

Comments

@tkefauver
Copy link

tkefauver commented Nov 11, 2023

Describe the bug

I've tried a million times to get Avalonia previewer working but always get "Invalid Markup" with Avalonia Diagnostics showing error below.

Even with a default user control created from the template its always the same and the log doesn't show any exception details, just '...' so I can't narrow the problem down.

Strangely enough Previewer works fine if I create a new project but not in my actual solution. Any suggestions how to fix this or is this a known issue perhaps?

To Reproduce

Hard to say, but possibly create an old 0.10 project template and update it manually to 0.11 then create a new user control and build.

AvaloniaVS plugin version

11.5

Avalonia version

11.0.5

Visual Studio version

17.7.6

Relevant log output

[Debug] 15816 <= UpdateXamlResultMessage { Error: "System.NullReferenceException: …", Handle: null, Exception: ExceptionDetails { ExceptionType: "NullReferenceException", Message: "Object reference not set to an …", LineNumber: null, LinePosition: null } }

Additional context

In the log before the error is this line:
[Debug] 25740 <= "Obtaining AppBuilder instance from <Class library namespace>.Program"
Which maybe fine but the class library doesn't have program in it.

Besides the "Invalid Markup" message, when the previewer shows the "Build Required" error it has a malformed .dll path listed where its always looking in bin\x86\Release even when building in "Debug | Any CPU". In my solution the platform comes after configuration so it should be bin\Release\x86 so that maybe a real clue to what the bug is.

@tkefauver tkefauver added the bug label Nov 11, 2023
@Takoooooo
Copy link
Contributor

Hey, maybe you upload your project to GitHub and i will be able test it and fix the problem?

@tkefauver
Copy link
Author

I was just hoping for a "delete your obj/bin folder" or some hints really. Its not open source but appreciate the thought :)

@Takoooooo
Copy link
Contributor

I am guessing that the problem is on the Avalonia side so hints may not work ;(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants