AvaloniaVSCode
AvaloniaVSCode copied to clipboard
permission denied
run vscode withe wsl and develop avalonia
2023-09-27 18:54:57.630 [info] Command avalonia.previewProcess, file:///mnt/e/Users/Heartacker/QSync/WSL_Share/Avalonia/AvaloniaDemo/AvaloniaDemo2/Views/MainWindow.axaml
2023-09-27 18:54:57.630 [info] Previewer process already started: 3930
2023-09-27 18:54:57.631 [info] Show Preview to side: file:///mnt/e/Users/Heartacker/QSync/WSL_Share/Avalonia/AvaloniaDemo/AvaloniaDemo2/Views/MainWindow.axaml
2023-09-27 18:54:58.651 [info] {"Error":"System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.\n ---> System.TypeInitializationException: The type initializer for 'Avalonia.Diagnostics.Conventions' threw an exception.\n ---> System.UnauthorizedAccessException: Access to the path '/mnt/d/Program Files/Microsoft VS Code/Screenshots' is denied.\n ---> System.IO.IOException: Permission denied\n --- End of inner exception stack trace ---\n at System.IO.FileSystem.CreateDirectory(String fullPath, UnixFileMode unixCreateMode)\n at System.IO.Directory.CreateDirectory(String path)\n at Avalonia.Diagnostics.Conventions.get_DefaultScreenshotsRoot()\n at Avalonia.Diagnostics.Screenshots.FilePickerHandler..ctor(String title, String screenshotRoot)\n at Avalonia.Diagnostics.Screenshots.FilePickerHandler..ctor()\n at Avalonia.Diagnostics.Conventions..cctor()\n --- End of inner exception stack trace ---\n at Avalonia.Diagnostics.Conventions.get_DefaultScreenshotHandler()\n at Avalonia.Diagnostics.DevToolsOptions..ctor()\n at Avalonia.DevToolsExtensions.AttachDevTools(TopLevel root)\n at AvaloniaDemo2.Views.MainWindow.InitializeComponent(Boolean loadXaml, Boolean attachDevTools) in /mnt/e/Users/Heartacker/QSync/WSL_Share/Avalonia/AvaloniaDemo/AvaloniaDemo2/Avalonia.Generators/Avalonia.Generators.NameGenerator.AvaloniaNameSourceGenerator/AvaloniaDemo2.Views.MainWindow.g.cs:line 29\n at AvaloniaDemo2.Views.MainWindow..ctor() in /mnt/e/Users/Heartacker/QSync/WSL_Share/Avalonia/AvaloniaDemo/AvaloniaDemo2/Views/MainWindow.axaml.cs:line 9\n at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)\n --- End of inner exception stack trace ---\n at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)\n at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadOrPopulate(Type created, Object rootInstance, IServiceProvider parentServiceProvider)\n at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.<>c.<LoadGroupSreCore>b__15_2(ValueTuple`2 t)\n at System.Linq.Enumerable.SelectEnumerableIterator`2.ToArray()\n at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadGroupSreCore(IReadOnlyCollection`1 documents, RuntimeXamlLoaderConfiguration configuration)\n at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadSreCore(RuntimeXamlLoaderDocument document, RuntimeXamlLoaderConfiguration configuration)\n at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadSre(RuntimeXamlLoaderDocument document, RuntimeXamlLoaderConfiguration configuration)\n at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.Load(RuntimeXamlLoaderDocument document, RuntimeXamlLoaderConfiguration configuration)\n at Avalonia.Designer.HostApp.DesignXamlLoader.Load(RuntimeXamlLoaderDocument document, RuntimeXamlLoaderConfiguration configuration)\n at Avalonia.DesignerSupport.DesignWindowLoader.LoadDesignerWindow(String xaml, String assemblyPath, String xamlFileProjectPath, Double renderScaling)\n at Avalonia.DesignerSupport.Remote.RemoteDesignerEntryPoint.<>c__DisplayClass18_0.<OnTransportMessage>b__0()","Handle":null,"Exception":{"ExceptionType":"TypeInitializationException","Message":"The type initializer for 'Avalonia.Diagnostics.Conventions' threw an exception.","LineNumber":null,"LinePosition":null}}
What is the use case here? I haven't tested the extraction on WSL
I use WSL to dev linux /windows app, this is a good way, maybe