When i add new View to a project and try to build it this error occurs:
`System.Xaml.XamlException: No precompiled XAML found for Test.Views.SchemesView, make sure to specify x:Class and include your XAML file as AvaloniaResource
17:59:18.882 [Error] Exception caught by FireAndForget
System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at AvaloniaVS.Services.PreviewerProcess.<OnMessageAsync>d__37.MoveNext() in D:\a\1\s\AvaloniaVS\Services\PreviewerProcess.cs:line 433
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
at AvaloniaVS.Services.PreviewerProcess.<OnMessageAsync>d__37.MoveNext() in D:\a\1\s\AvaloniaVS\Services\PreviewerProcess.cs:line 433<---
`
How can it be resolved ?
This error means that Avalonia XAML-compiler MSBuild task hasn't processed any XAML for SchemesView
. It could be caused by several reasons:
AvaloniaResource
or EmbeddedResource
x:Class
directive is missing or invalidAvalonia
package. As of version 0.9.x
direct reference is required because of compatibility with .NET Core 2.1 SDK, which lacks support for buildTransitive
. This restriction will be probably lifted in 0.10
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With