[MonoDevelop] Visual Studio 2005 Import

Lluis Sanchez lluis at ximian.com
Thu Sep 21 06:57:36 EDT 2006


El jue, 21-09-2006 a las 09:56 +0100, Gideon de Swardt escribió:
> Hi All
> 
> I was also thinking that porting some of the functionality from #Develop
> over to do this. One of the features that I really liked was that you can
> open your VS.NET solution natively in SharpDevelop.
> 
> I am open for any directions or suggestions.

In MD you can provide support for new file formats by implementing the
IFileFormat interface. For example, the ReadFile method should read a
file and return a Project instance (if it's a project) or a Combine (if
it's a solution). 

When opening a project, you would need to create the correct instance of
a Project. For a C# project it would be "new DotNetProject ("C#")". Then
you would need to add the files and the project references.

Notice that after the project is loaded, it will look like to any other
native MD project, and it will be built and executed using the MD build
system.

> 
> A questions that just jump straight out at me, would be how would current
> AddIns integrate with VS.NET 2005 project and solution files?

Add-ins interact with projects using the MonoDevelop.Projects object
model, so the format used to read the project is not relevant.

> 
> I know that for instance the WebReference AddIn would have to change to use
> the native WebReference xml element for VS.NET projects instead of just
> adding ProjectFiles to MD project and hiding it them from the user. In fact
> the AddIn would require a separate NodeBuilder for loading WebReferences for
> VS.NET 2005 projects.

The IFileFormat implementation should take care of it. At load time, it
could parse the WebReference xml element and add a ProjectFile to the
project being read, and do the reverse operation when saving.

> 
> How would this effect any other AddIns?

The MD project model is extensible, that is, add-ins can add new
properties to Project object and get them saved in the project file.
Add-ins depending on this feature might not work. However I don't think
this is a big issue, since those additional features wouldn't be
supported by Visual Studio anyway.

Lluis.




More information about the Monodevelop-list mailing list