ForNeVeR / AvaloniaRider

JetBrains Rider plugin for Avalonia development
https://plugins.jetbrains.com/plugin/14839-avaloniarider/
MIT License
453 stars 19 forks source link

AvaloniaRider extension locking DLL #420

Closed dbchandra23 closed 2 months ago

dbchandra23 commented 2 months ago

The extension locks the DLL. This caused an issue when I try to use 'dotnet build' which is required when I try to run 'dotnet ef migrations add '. The build DLL could be copied to the output directory because it is locked by the extension.

When I disabled the extension, everything works. It will be great to have this fixed, or if there is a specific workflow I can use so I don't have to keep disabling the extension when I try to run a build from the command line.

ForNeVeR commented 2 months ago

Yes, it does: to show the previewer, we have to pass it to the previewer process, and it has to lock the DLL file on disk (on Windows, that is). I do not know a way around that.

When you use Rider functions (e.g. build the project in Rider), we temporarily shut down all the active previewers and restart them afterwards.

The plugin has no way of knowing what you do in an external (or embedded one, for that matter) terminal, unfortunately.

Not sure what we can do here.

ForNeVeR commented 2 months ago

if there is a specific workflow I can use so I don't have to keep disabling the extension when I try to run a build from the command line.

Currently, to shut down all the previewer processes, you'll have to shut down all the editors with XAML files. Which, of course, would be quite inconvenient.

I think we can easily add a button for you to temporarily suspend all the previewers. The processes would be terminated, you'd do your things in the terminal and then press the button to bring them back up again.

Would that work?

dbchandra23 commented 2 months ago

Thanks for the feedback. I found an existing solution that works in Rider. They have an EntityFramework tool that works. This is the article - I put the link here in case someone else encounters the same issue - https://blog.jetbrains.com/dotnet/2022/01/31/entity-framework-core-inside-rider-ui-way/.

The only issue with the plugin is that it does not support preview version of dotnet. So, I have to manually tick both dotnet 9.0 (still in preview) and dotnet 8 which is on LTS.