[Mono-osx] My Project Files Moved & Susan's Xcode Plug-in

Mark Satterthwaite deepmark9 at macunlimited.net
Sun Oct 15 12:14:44 EDT 2006

Hi Folks,

First off, I've had to move MonoTool & CocoaSharpApplication projects  
from their previous location - Joomla started giving me lot's of  
funny errors. They can now be found by following the links below:

I've also added them to one of my journal entries on .Mac so that  
they don't disappear when I graduate.

I've also been playing with Susan's wonderful Xcode plug-in. Ken  
didn't seem to have much luck with it on his G4 iMac, but I've only  
run in to a few problems on my 12" PB (1GHz G4, 10.4.8, Mono 1.1.18,  
Xcode 2.4).

1. Compiling the default Hello-World! app results in the following  
"[Session started at 2006-10-15 16:51:51 +0100.]

Unhandled Exception: System.TypeInitializationException: An exception  
was thrown by the type initializer for System.Console --->  
System.NullReferenceException: Object reference not set to an  
instance of an object
   at System.TermInfoDriver.Init () [0x00000]
   at System.ConsoleDriver.Init () [0x00000]
   at System.Console..cctor () [0x00000] --- End of inner exception  
stack trace ---

   at <0x00000> <unknown method>
   at InstallTest.InstallTest.Main () [0x00000]
   at InstallTest.InstallTest.Main () [0x00000]

InstallTest has exited with status 1."

By setting the .NET version flag to V1 in the Build tab of the Target  
Info inspector window I got the expected output:
"[Session started at 2006-10-15 16:54:05 +0100.]
Goodbye, Forever!

InstallTest has exited with status 0."

What is interesting though is that if you run the V2 compiled program  
from Terminal (or WidgetTerm) it works perfectly. After some poking  
around in the project file, plug-in code and various templates I  
can't see what's going wrong. Could it be a bug in GMCS/Mono on PPC  
or in Xcode on PPC with regards to Xcode's Pseudo Terminal?

2. Adding C Sharp/Executable targets doesn't really work. Adding an  
executable generates the target & it appears OK, but the associated  
Executable is not configured to run /usr/bin/Mono. Also, changing the  
build setting to Release and pressing Build does not actually build  
anything. Haven't checked into this to see what's really going on, so  
it could very well be something I'm doing wrong.

Finally, if you would like me too I'll make the time to make the  
CocoaSharpApplication a proper project template and then someone can  
add it to the files distributed with the plug-in.

Frankly I'm really impressed with the work Susan has put into this  
plug-in as it does seem to work reasonably well most of the time.  
When I get my new Macbook Pro (sometime in the next week) I'll try  
comparing Intel/PPC in the (probably vain) hope that it might  
illuminate some of the odd behaviour on PPC. I spent most of the  
summer working in Objective-C and Cocoa, though I would not claim to  
be any kind of expert, so I should be able to track down at least  
some of the bugs. Of course my doing this shouldn't stop the more  
experienced programmers out there from having a go.

Thanks Susan!


On 27 Sep 2006, at 15:33, mono-osx-request at lists.ximian.com wrote:

> Send Mono-osx mailing list submissions to
> 	mono-osx at lists.ximian.com
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.ximian.com/mailman/listinfo/mono-osx
> or, via email, send a message with subject or body 'help' to
> 	mono-osx-request at lists.ximian.com
> You can reach the person managing the list at
> 	mono-osx-owner at lists.ximian.com
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Mono-osx digest..."
> Today's Topics:
>    1. Re: Xcode plugin for C#/Mono (Ken & Deb Allen)
> ----------------------------------------------------------------------
> Message: 1
> Date: Wed, 27 Sep 2006 09:54:43 -0400
> From: Ken & Deb Allen <kendrhyd at sympatico.ca>
> Subject: Re: [Mono-osx] Xcode plugin for C#/Mono
> To: Susan Mackay <susanmackay at optusnet.com.au>
> Cc: mono-osx at lists.ximian.com
> Message-ID: <26F2A34D-EFBC-4C02-A2BE-0272375EDB59 at sympatico.ca>
> Content-Type: text/plain; charset="us-ascii"
> I have just downloaded your Xcode plugin for C#/Mono, something I
> have been looking for for some time, with great anticipation. I was a
> bit disappointed to discover that it did not work properly on my G4
> iMac running MacOS 10.4.7, Xcode 2.4 and Mono 1.1.17-3.
> I read through your PDF and noted your disclaimer that the code had
> only been tested on Intel based systems. Provided are the steps I
> followed and some details I observed. I am willing to send you any
> specific files you wish or to assist in any other matter to aid to
> resolving this -- just let m know.
> 1. I installed the files in exactly the manner you indicated, and the
> options showed up the project type dialog as expected.
> 2. I create a new C# application project named "FromXcode" just to
> see what would happen.
> 3. The first thing that I noticed, was that in the main Xcode window
> (see Picture1 attached) there was an unnamed 'Product' file. This
> does not agree with your document where the name of this other file
> should be (in my case) "FromXcode.exe".
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: Picture 1.png
> Type: image/png
> Size: 24348 bytes
> Desc: not available
> Url : http://lists.ximian.com/pipermail/mono-osx/attachments/ 
> 20060927/e9216891/attachment.png
> -------------- next part --------------
> 4. Ignoring this I attempted to compile the project and received the
> following message (see Picture2):
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: Picture 2.png
> Type: image/png
> Size: 33025 bytes
> Desc: not available
> Url : http://lists.ximian.com/pipermail/mono-osx/attachments/ 
> 20060927/e9216891/attachment-0001.png
> -------------- next part --------------
> 5. I then attempted to add the C# Library target to the project
> (named it "XcodeLib") and noticed that the "Architecture" was not
> "mono" as your documentation indicated, but "ppc"; I changed this in
> both targets and now the original target seemed to compile (no errors
> were reported) -- but the "Run" option does not become enabled! Nor
> is there any indication that the library (which has no sources) was
> compiled or created. The list of source files contains only the
> original CS file and the unnamed target.
> 6. Subsequent attempts to build report that dependencies are being
> checked, a Clean does not change this -- the source file is not
> actually compiled again. Even stopping and starting Xcode and
> removing the build folder from the project does not change this. If I
> look into the build folder, there is no EXE file generated (possibly
> because the target file is incorrect).
> 7. I went back and re-read your documentation and realized I had made
> an error. On page 10 you indicate that one should right-click on the
> sources icon (in the left of the main Xcode window, I presume) and
> select the "Add" and "New File..." option -- but when I do so, there
> is no "C Sharp" option as your documentation indicates!
> 8. Finally, as a second check, I started over from scratch, deleting
> the entire project folder, but this time I changed the architecture
> from "ppc" to "mono" before I attempted to build the application for
> the first time. The build did not indicate that any source file was
> compiled -- just that dependencies were being checked and that all
> was well. Againt, nothing to run.
> -ken
> On 27-Sep-06, at 4:29 AM, Susan Mackay wrote:
>> NB This is the second attempt at sending this - the first version
>> had an
>> attached zip file that was too large - I've just included the files
>> needed
>> to install and run the plugin. I'll post the other files  
>> separately in
>> another post later on if this one 'gets through'. Sorry about that.
>> I've attached a zip file containing a plugin that I've been
>> developing to
>> allow Xcode to be used as the IDE for C#/Mono.
>> The zip file is really just a snapshot of the installation file of  
>> the
>> plugin, along with some documentation files (.pdf)
>> Full installation instructions are given in the documentation but
>> the first
>> page has a "quick start" for those who just want to give it a try.
>> It knows about C# source files, how to compile them to create
>> library and
>> executable assembly files, as well as dependencies between library
>> assemblies and executable ones. Compile errors can link back to the
>> source
>> line the compiler is complaining about.
>> Also, it is possible to run the executable from within Xcode.
>> However you
>> cannot debug the application.
>> I've put this forward as a 'work in progress' and I am wanting
>> those more
>> knowledgeable than I to either provide me with feedback and
>> suggestions, or
>> to take the code and improve on it.
>> Hope this helps someone....
>> Susan
>> <CSPlugin.zip>
>> _______________________________________________
>> Mono-osx mailing list
>> Mono-osx at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-osx
> ------------------------------
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
> End of Mono-osx Digest, Vol 17, Issue 8
> ***************************************

More information about the Mono-osx mailing list