icsharpcode / AvaloniaILSpy

Avalonia-based .NET Decompiler (port of ILSpy)
1.5k stars 169 forks source link

Fix saving C# project into a single file | #66 #124

Open TSRBerry opened 1 year ago

TSRBerry commented 1 year ago

Just saw #66 and how nemec commented the responsible line for that behavior. I haven't really spent enough time with the code to confidently say that this works for every invocation of the Save() method. But since there are filters for single and project files, I'm not really sure if my solution is good enough.

While debugging I couldn't figure out how to get the save dialog of this method to open for anything else than for saving a project, so I decided to leave it that way and PR it.

TSRBerry commented 1 year ago

image Are you referring to clicking on "Save Code" for a single class? This results in saving a single C# file.