[MonoDevelop] How can I reorder project items from project options widget?

Michael Hutchinson m.j.hutchinson at gmail.com
Thu Jul 15 00:18:35 EDT 2010

On Wed, Jul 14, 2010 at 10:35 AM, lost <lostfreeman at gmail.com> wrote:
> Hello!
> I've made file reordering window for F# projects. I'm trying to save new
> file order.
> In order to do this I remove all files from project instance
> (DotNetProject.Files property), and add them again in correct order. After
> that I call IdeApp.ProjectOperations.Save(project) passing modified
> DotNetProject.
> But when I reopen options window I can see in it (and in debugger too) that
> files are in the same order they've been before.
> It seems that initially files are in order they appear in project file, so
> for loader order matters.
> What should I do to correctly save new file order in project?

I suspect removing and re-adding the files will destroy custom MSBuild
metadata, such as conditions. IMO it would be better to add an API to
MD core for reordering the file.

It also might make more sense to allow re-ordering files in the
project tree, instead of a custom reordering window. How does VS
handle this?

Maybe we could discuss this in the #monodevelop IRC channel sometime?

Michael Hutchinson

More information about the Monodevelop-list mailing list