SAVE PROJECT

Hello,
how can i save C# project changes (like a added Assembly Reference) using the dotNetProject class?
Is there something similar to the TextEditor class like TextEditor.Source.SaveFile(yourFileName)?

Regards,
Johannes
Hi,
Project.Save is implemented as extension method in Alternet.Editor.Roslyn assembly
You will need to add reference to this assembly to your project and add Alternet.Editor.Roslyn namespace to using section, then you can call this method.
Hope it helps,
Dmitry
Hello,
thanks for the information.
Sadly the Save() functionality is not supported for .NET Core.
Is there a alternartive to save a project to the file system, if modified with .NET Core?
Regards, Johannes
Hi,
We tried to implement project saving for .NET core and SDK-style projects as well, it required newer version of Microsoft Build Tools (14.0) to work. However it caused some side effects on user machines.
We raised this issue with Microsoft, but it does not seem to be a good solution here. Please refer to the following discussion here:
https://github.com/dotnet/msbuild/issues/5913#issuecomment-746625619
Regards,
Dmitry
Alternative would be to form XML document manually to save the project, similarly to how we load project from XML in DotNetProjectExtension.
We might be able to provide our own SaveProject implementation in the next update.
Regards,
Dmitry