[MonoDevelop] Import Visual Studio .NET Projects

Francisco T. Martinez martinf@mfconsulting.com
Tue, 15 Mar 2005 08:01:53 -0600


Hola:

The MD add-in prj2make-sharp-lib needs love.  Over the next few days I 
am going to try to do my best to make some corrections and fixes.   MD 
as well as its ancestor SD use specific version information on the 
reference version of a project.  This is unlike Visual Studio, which 
uses "hint paths" and a couple of registry keys to figure out where to 
load references at compile time.  To import a Visual Studio Solution 
while no longer in VS and without access to the originating system's 
registry and absolute paths is a job that requires a lot of guessing.  
Often, these guesses get you very close to what it should be, but is 
less than perfect.

At one point I decided to peek into the different "versioned 
repositories" for dlls to try to figure out what assembly -- and its 
version -- to use when generating the reference section on a prjx.  This 
was done by trying to match the file name of the dll being reference in 
the source MS VS csproj against one of the files in these locations:

$prefix/lib/mono/1.0
$prefix/lib/mono/2.0
$prefix/lib/gtk-sharp/1.0

Suffice it to say that this approach does not take into account the 
newer $prefix/lib/gtk-sharp/2.0 folder and that it fails to do a good 
job of addressing third party libraries like Gecko# and others that will 
come later.

The details of this logic can be found on 
MonoDevelop/core/src/add-in/MsPrjHelper.cs around line 657 or so on:

protected MonoDevelop.Prj2Make.Schema.Prjx.Reference[] 
GetReferences(MonoDevelop.Prj2Make.Schema.Csproj.Reference[] References)

However, in my little research I have discovered that MD is not liking 
Mono's core 2.0 (the library set you get when you build mono 
--with-preview=yes) references.  Have I arrived at the wrong conclusion 
with the 2.0 references?

Anyhow, I just want it to tell folks that MD is getting very Sexy and I 
certainly don't want to let the "Import Visual Studio .NET Projects" 
functionality bring it down.  I will do some refactoring and 
re-engineering of how the guess work takes place, but want to remind you 
that I am very open to ideas.

Paco
PS
http://bugzilla.ximian.com/show_bug.cgi?id=73705 is OK to commit