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

Previewer does not check for presence of bin folder & necessary content #71

Open
Mrcubix opened this issue Nov 16, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@Mrcubix
Copy link

Mrcubix commented Nov 16, 2023

If you remove the bin and obj folder after getting a successful preview (e.g using a previous version of the extension as it's currently broken right now), and try to open another preview, then an exception will occur trying to open a specified assembly;

2023-11-16 18:01:12.532 [info] {"Error":"System.IO.FileNotFoundException: Could not load file or assembly 
'c:\\Users\\tinta\\Documents\\Repo\\C#\\Avalonia\\Examples\\Issues\\Extension\\MalfunctionningPreview\\Malfunctionning-Preview\\bin\\Debug\\net7.0\\Malfunctionning-Preview.dll'. 
The system cannot find the file specified.
File name: '[...]\\Issues\\Extension\\MalfunctionningPreview\\Malfunctionning-Preview\\bin\\Debug\\net7.0\\Malfunctionning-Preview.dll'
   at System.Reflection.Assembly.LoadFile(String path)
   at Avalonia.DesignerSupport.DesignWindowLoader.LoadDesignerWindow(String xaml, String assemblyPath, String xamlFileProjectPath, Double renderScaling)
   at Avalonia.DesignerSupport.Remote.RemoteDesignerEntryPoint.<>c__DisplayClass18_0.<OnTransportMessage>b__0()","Handle":null,"Exception":{"ExceptionType":"FileNotFoundException","Message":"Could not load file or assembly '[...]\\Issues\\Extension\\MalfunctionningPreview\\Malfunctionning-Preview\\bin\\Debug\\net7.0\\Malfunctionning-Preview.dll'. The system cannot find the file specified.","LineNumber":null,"LinePosition":null}}

2023-11-16 18:01:12.532 [info] {"Error":"System.IO.FileNotFoundException: Could not load file or assembly 
'[...]\\Issues\\Extension\\MalfunctionningPreview\\Malfunctionning-Preview\\bin\\Debug\\net7.0\\Malfunctionning-Preview.dll'. 
The system cannot find the file specified.
File name: '[...]\\Issues\\Extension\\MalfunctionningPreview\\Malfunctionning-Preview\\bin\\Debug\\net7.0\\Malfunctionning-Preview.dll'
   at System.Reflection.Assembly.LoadFile(String path)
   at Avalonia.DesignerSupport.DesignWindowLoader.LoadDesignerWindow(String xaml, String assemblyPath, String xamlFileProjectPath, Double renderScaling)
   at Avalonia.DesignerSupport.Remote.RemoteDesignerEntryPoint.<>c__DisplayClass18_0.<OnTransportMessage>b__0()","Handle":null,"Exception":{"ExceptionType":"FileNotFoundException","Message":"Could not load file or assembly '[...]\\Issues\\Extension\\MalfunctionningPreview\\Malfunctionning-Preview\\bin\\Debug\\net7.0\\Malfunctionning-Preview.dll'. The system cannot find the file specified.","LineNumber":null,"LinePosition":null}}

Tested on https://github.com/Mrcubix/MalfunctionningPreview w/ 11.0.5, instead of 11.0.4 that's currently set in Directory.Build.props

@prashantvc prashantvc added the bug Something isn't working label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants