[Mono-list] C#: Compiling Classes Independently - How?
alan.mcgovern at gmail.com
Mon Jun 29 18:48:41 EDT 2009
On Mon, Jun 29, 2009 at 10:02 PM, G_Morgan <gmorgan1984 at googlemail.com>wrote:
> So the official advice is to shut up and deal with it ;). I think I can
> understand why MS decided to do things this way. Something along the line
> 'OMG look at all those class files everywhere' wrt Java. Why don't they
> understand that C got it right in times immemorial? That you should copy
> exactly and never question the one true way!
> Out of interest are there any build tools that manage Mono projects in a
> sane manner or do they all face the same problem I've bumped into trying to
> use make?
The only issue you've mentioned is that you noticed that C# code compiles
differently to C code, so I can only assume that this is the problem you're
referring to. If so, the solution really isn't "shut up and deal with it",
the solution is to realise this isn't a problem. There is a way to simulate
the C build process, but it'd make your compile take at least three times
longer than normal and would make maintenance of your project such a
gigantic pain that you'd revert back to the normal (fast) workflow within
As a single datapoint, 35,000 lines of code (excludes whitespace) can
compile in under 2.5 seconds using gmcs on my rather modest 1.86ghz laptop
with 5400 rpm harddrive. A computer with a faster hd will compile faster I'm
> Charlie Poole wrote:
> > Hi,
> > I remember being equally surprised when I moved from C++
> > to C#. What you describe is how C++ works, but not how C# works.
> > In the long run, I think you'll be much more satisfied with
> > the results if you learn to adapt to this new environment.
> > There are, of course, ways to simulate your C++ experience
> > using modules, but you will be creating a terribly complicated
> > structure and anyone who follows you on the job will not
> > be thankful. :-)
> > If you have real performance problems with your compiles, it
> > may mean that you are putting too much into a single assembly.
> > It's pretty normal for an application developed in C# to have
> > multiple assemblies, which are all delivered in the same
> > directory.
> > I suggest you try to go with the flow for a few weeks and
> > then decide whether you really need to simulate your old
> > environment.
> > Charlie
> >> -----Original Message-----
> >> From: mono-list-bounces at lists.ximian.com
> >> [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of G_Morgan
> >> Sent: Monday, June 29, 2009 11:51 AM
> >> To: mono-list at lists.ximian.com
> >> Subject: [Mono-list] C#: Compiling Classes Independently - How?
> >> Simply put I always develop my code in C++ by compiling each
> >> file into a separate object code file and then linking them
> >> together. In C# I'm struggling to see how to do this or
> >> anything similar. I've tried using assemblies and modules but
> >> both require me to actually deliver the assembly or module
> >> with the executable. Does a mechanism exist by which a module
> >> can be copied directly into the executable image and thus let
> >> me delete the .netmodule files and still run? If not is there
> >> a sensible CLI mechanism to allow C# programs to be developed
> >> in such a way that I'm not doing a complete rebuild with
> >> every minor change?
> >> I've tried using the incremental flag but smcs seems to throw
> >> a fit complaining about missing .netmodule files. The
> >> description of the option in the MSDN documents doesn't
> >> suggest that these files are needed.
> >> --
> >> View this message in context:
> >> http://www.nabble.com/C-%3A-Compiling-Classes-Independently---
> >> How--tp24259351p24259351.html
> >> Sent from the Mono - General mailing list archive at Nabble.com.
> >> _______________________________________________
> >> Mono-list maillist - Mono-list at lists.ximian.com
> >> http://lists.ximian.com/mailman/listinfo/mono-list
> > _______________________________________________
> > Mono-list maillist - Mono-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> View this message in context:
> Sent from the Mono - General mailing list archive at Nabble.com.
> Mono-list maillist - Mono-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-list