|
List Info
Thread: Moving to MSBuild
|
|
| Moving to MSBuild |

|
2008-02-25 18:00:13 |
Hi!
Some people asked me to comment on the move to MSBuild that
I mentioned
in my blog.
So, what does it mean moving to MSBuild? it can mean several
things:
1. Use the MSBuild file format, instead of our current
.mds
and .mdp format.
2. Use MSBuild as build engine, instead of our
IDotNetLanguageBinding implementations.
3. Use MSBuild as project object model for MD, instead
of our
Combine/Project classes.
Our plan is to do 1), do 2) at mid term, and we don't have
plans to do
3).
Using MSBuild as file format (1) won't be hard. We already
have a
MSBuild file reader/writer in our VS add-in. However, we'll
have to do
some changes in the object model to better support the
MSBuild format.
One of the changes is removing support for nested solutions,
which will
be replaced by solution folders (in case you want to
organize projects
inside a solution) and by workspaces (which will allow
grouping several
solutions together). In any case, there won't be radical
changes in the
public frontend API. If you want to write an add-in which
gets
information from a project, such as files or references, or
adds custom
data to projects, etc, that won't change much.
To use MSBuild as build engine for MD (2) we need a complete
MSBuild
implementation, or at least one that is good enough for MD.
XBuild
(Mono's MSBuild implementation) can build simple projects,
but there is
still important work to do to make it fully usable in MD.
Using MSBuild
as build engine will require important changes in the
backend, so if you
are writing an add-in for supporting a new language, you'll
face more
important changes. Maybe you are wondering if extensions to
the build
engine will have to be written as MSBuild extensions or
MonoDevelop
extensions. The answer is that it depends on what the
extension is for.
If the extension is to be run only inside the IDE, you'll be
able to use
the existing extension points (for example, that's what the
Stetic
designer will use to hook up the gui code generation). If
you want to
change the build behavior and make sure it works even when
building the
project from outside the IDE, you'll have to use MSBuild
extensions.
We are not considering the use of the MSBuild object model
as project
object model for MonoDevelop (3) because it is too complex
to use. We
need a more higher level, more generic and more simple API,
which
supports MSBuild as backend, but can also support other
build engines
and file formats, just like our current project model does.
My plan for the move to MSBuild is the following:
* Do the necessary changes in the project class
hierarchy to
better fit the MSBuild project model.
* Implement the new project reader/writer (or reuse
the one we
have in the VS add-in).
After those changes we'll be able to use msbuild as default
file format,
although projects will still be built using our custom
language binding
backend. This will be ready for the next major post-1.0 MD
release.
The next steps would be:
* Implement the missing bits in xbuild.
* Change the MD's build engine, so it builds projects
using xbuild
instead of the custom language binding extensions.
I'm not sure when we'll be able to do this change, since it
will depend
on how mature xbuild is. We'll also have to take into
consideration the
MonoDevelop dependencies. The xbuild funcionality is
implemented in
Microsoft.Build.* namespaces, which are provided by Mono. We
can
implement the missing MSBuild features until it is good
enough for MD,
but it means that MD will depend on bleeding edge Mono
releases, and
that may be a problem in some distros.
So, that's it.
Lluis.
_______________________________________________
Monodevelop-list mailing list
Monodevelop-list lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
|
|
| Re: Moving to MSBuild |
  Italy |
2008-02-25 18:06:17 |
Il giorno mar, 26/02/2008 alle 01.00 +0100, Lluis Sanchez ha
scritto:
> Hi!
>
> Some people asked me to comment on the move to MSBuild
that I mentioned
> in my blog.
You explained very well how, but can you comment on why?
federico
--
Federico Di Gregorio http://people.initd.org/f
og
Debian GNU/Linux Developer
fog debian.org
INIT.D Developer
fog initd.org
The number of the beast: vi vi vi. --
Delexa Jones
_______________________________________________
Monodevelop-list mailing list
Monodevelop-list lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
|
|
| Re: Moving to MSBuild |

|
2008-02-25 21:43:33 |
El dt 26 de 02 del 2008 a les 01:06 +0100, en/na Federico Di
Gregorio va
escriure:
> Il giorno mar, 26/02/2008 alle 01.00 +0100, Lluis
Sanchez ha scritto:
> > Hi!
> >
> > Some people asked me to comment on the move to
MSBuild that I mentioned
> > in my blog.
>
> You explained very well how, but can you comment on
why?
The main reason is to avoid maintaining yet another file
format for .net
projects. We'll have to support MSBuild anyways (for VS and
SD
compatibility), and the MSBuild file format is flexible
enough for our
needs, so there is no compelling reason for using a custom
file format.
Lluis.
_______________________________________________
Monodevelop-list mailing list
Monodevelop-list lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
|
|
| Re: Moving to MSBuild |

|
2008-02-25 21:52:22 |
On Mon, Feb 25, 2008 at 7:06 PM, Federico Di Gregorio
<fog initd.org> wrote:
> > Some people asked me to comment on the move to
MSBuild that I mentioned
> > in my blog.
>
> You explained very well how, but can you comment on
why?
Since the MSBuild format is extensible enough to support all
of the
information we wish to store, it makes very little sense to
implement
our own format. These change will:
* Make things much easier and less confusing for users who
want to
interoperate with #Develop and Visual Studio, by being
fully
compatible with their native project file format.
* Give MD and Mono a much better command-line build story.
MSBuild is
extensible enough to be able to replace makefiles, so when
the XBuild
work is completed, solutions will be buildable directly on
Mono and
.NET without having MonoDevelop installed.
* Lead to less maintenance for us. With only one major
project
backend, we can spend time on other features
In the end, MSBuild integration will be very similar in
principle to
Makefile integration. MD will load and store the variables
and lists
that it understands, and invoke targets to build projects.
By
hand-editing the project files you will be able to set up
very complex
and powerful build systems if needed.
--
Michael Hutchinson
http://mjhutchinson.com
_______________________________________________
Monodevelop-list mailing list
Monodevelop-list lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
|
|
| Re: Moving to MSBuild |
  Italy |
2008-02-26 05:38:24 |
Il giorno lun, 25/02/2008 alle 22.52 -0500, Michael
Hutchinson ha
scritto:
> On Mon, Feb 25, 2008 at 7:06 PM, Federico Di Gregorio
<fog initd.org> wrote:
> > > Some people asked me to comment on the move
to MSBuild that I mentioned
> > > in my blog.
> >
> > You explained very well how, but can you comment
on why?
[...]
I understand. Thank you very much Lluis and Michael for the
answer.
--
Federico Di Gregorio http://people.initd.org/f
og
Debian GNU/Linux Developer
fog debian.org
INIT.D Developer
fog initd.org
God is real. Unless declared integer. -- Anonymous
FORTRAN programmer
_______________________________________________
Monodevelop-list mailing list
Monodevelop-list lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
|
|
| Re: Moving to MSBuild |

|
2008-03-13 14:26:34 |
On Thu, Mar 13, 2008 at 2:43 PM, Andres G. Aragoneses
<aaragoneses novell.com> wrote:
> I have a question about this: Will the MD file format
be maintained
> anyway (or not dropped at least)? If the answer is
'no', then I just
At the very least, we will certainly have importers...
> wanted to point out a number of reasons not to do
this:
> - There are several projects that already use it.
> - There are some interesting things in the MD project
file format that I
> think are better than MSBuild:
> 1) Same file extension for any type of project
regardless the language.
We want VS compatibility where possible, so we will use
.csproj and
.vbproj etc., but apart from that I see no reason to invent
lots of
new file extensions.
> 2) Solutions inside solutions support. (Even in Mono
SVN this feature is
> used.)
VS solutions aren't actually MSBuild files, even though
MSBuild
understands them, and it would be possible to represent
nested
solutions with MSBuild files, but VS would not be able to
load them.
Solution folders (structuring of projects within a solution)
partially
solve the problem. We will probably also have
"workspaces" for
grouping solutions, but the solutions themselves will be VS
solutions.
> 3) Support for unmanaged projects (well, I'm not sure
if the MSBuild
> counterpart of this either exists, or if it's
supported in MD, or if its
> support is planned)?
We will be doing this for C projects etc. MSBuild files are
about as
flexible as makefiles. We just need to write the relevant
build
targets. VS seems to invoke the targets through MSBuild to
do the
actual builds, making it similar to our makefile
integration.
VS C/C++ projects don't use the MSBuild format yet, but that
is likely
to change in the future. TBH, we don't really care about
unmanaged VS
projects ATM.
> 4) Use of not-win32ish stuff (for example
backslashes for paths).
Unfortunately, this would mean the projects would not be be
buildable
with MSBuild on Windows, let alone be able to be opened in
VS.
> Thoughts? Any point of view will be appreciated.
--
Michael Hutchinson
http://mjhutchinson.com
_______________________________________________
Monodevelop-list mailing list
Monodevelop-list lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
|
|
[1-6]
|
|