Replies: 4 comments
-
It seems like there was a bug introduced somewhere in the build process that didn't manifest though beta/RC testing until the AvaloniaVS extension was updated. #16427 seems to fix it for me, but you need to locally setup the PR package feed to use it. I'm not sure when the team plans to ship this fix, assuming it's enough to fix the issue. This should also affect VS Code, but Rider appears to be unaffected in my quick testing. |
Beta Was this translation helpful? Give feedback.
-
While waiting for the fix to be released, you can try adding the following target to your <Target Name="UpdateAvaloniaReferences" AfterTargets="CompileAvaloniaXaml">
<PropertyGroup>
<AvaloniaXamlReferencesTemporaryFilePath Condition="'$(AvaloniaXamlReferencesTemporaryFilePath)' == ''">$(IntermediateOutputPath)/Avalonia/references</AvaloniaXamlReferencesTemporaryFilePath>
</PropertyGroup>
<WriteLinesToFile File="$(AvaloniaXamlReferencesTemporaryFilePath)" Lines="@(ReferencePathWithRefAssemblies)" Overwrite="true" />
</Target> |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestions. Unfortunately both solutions do not work for me, the view stays unaffected when making changes, saving of compiling. I have to reopen the file for the changes to be applied in the preview. I guess I'll just have to wait for an official fix then. |
Beta Was this translation helpful? Give feedback.
-
Interesting. After creating a new project and copying the few changes that I made into it, the view is updating as it would be expected. Not sure what I did differently this time, I tried with a new project multiple times yesterday before posting, and nothing seemed to work. |
Beta Was this translation helpful? Give feedback.
-
Hello all
I'm new to Avalonia, only downloaded and installed it yesterday. I have the problem that the XAML preview is not updating when I make changes to the code. However if I save the file, close and then open it again, my changes are reflected in the preview. It's a bit cumbersome to work like this. Google didn't really help unfortunately. Is this know, or is there a fix to this?
I'm using the latest version of Visual Studio Community 2022 and installed Avalonia thru the available vsix installer.
Thanks
Martin
Beta Was this translation helpful? Give feedback.
All reactions