Why loading file to editor drops all registered assemblies?

edit.LoadFile(fileName); or edit.FileName = fileName; where edit is Alternet.Editor.Common.Wpf.ScriptCodeEdit drops before registered assembly.

Is there way to prevent? Is it a bug?

Hi Audrius,

RegisterAssemblies/RegisterAssembly needs FileName to be set beforehand. Setting Filename creates creates editor’s parser based on the file name’s extension, which is used in RegisterAssembly.
RegisterAssemblies internally uses underlying solution, but again it determines which one to use (for C# or Visualbasic) based on file’s extension.

If you already have filename set, changing it to another one (with the same extension) should not reset assemblies.

Let me know if it helps.