[Mono-list] Embedding mono

Rodolfo Campero rodolfocampero@hotmail.com
Sat, 19 Jun 2004 12:29:42 -0300


El s=E1b, 19-06-2004 a las 12:08, Joe Ante escribi=F3:
> > It sounds like you want a highly dynamic environment, in which existing
> > code can be changed at runtime, with older code silently invoking newer
> > code.
> > I don't believe it's possible, or at least easily possible, to do this
> > in C#.  This sounds more like something System.Reflection.Emit and a
> > custom compiler would be useful for.  That way, you could ensure fast
> > compile time, and you could come up with a custom way for pre-existing
> > code to invoke newer code without requiring recompilation (interfaces
> > might be good for this).
> Ok I think I formulated the problem not very well. I think its good enoug=
h
> to create one assembly for an "island of scripts" that somehow depend on
> each other. Very often in our engine we have the case that just 1-3 scrip=
ts
> depend on each other. So I want to make sure that when someone changes on=
e
> of those 3 scripts, we will only recompile those 3 scripts and not every
> single script in the entire project.
>=20
> So I would like to have something like C's #include "foobar.cs" thingy, f=
rom
> which I can then generate a dependency list so that I know which files to
> recompile when the user saves a script.
> Am I completely off track and stuck in the C past with that idea?

You can define modules instead of assemblies, and trace dependencies
towards its source files using makefiles - you will have only one
assembly made up of several modules. This way, instead of recompile the
whole thing every time a source file changes, you can compile just the
module.
The result is the same as having a single assembly, but the compile time
will decrease.

>=20
> How does monodevelop handle this? I mean when you change a single file in
> one project does monodevelop recompile every single .cs file that makes u=
p
> the exe?
>=20
> Joachim Ante
> www.otee.dk
>=20
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
--=20
Rodolfo Campero
http://expertcoder.sourceforge.net/