<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-18409291</id><updated>2011-04-21T15:10:55.362-07:00</updated><title type='text'>Cross platform .NET development</title><subtitle type='html'>The purpose of this blog is to provide information and resources for developers wanting to create .NET WinForms (System.Windows.Forms) applications using Visual Studio.NET on Windows and then run them on Mac OS X and Linux.

Keywords: C#, VB.NET, Visual Basic.NET, C++.NET, System.Windows.Forms, Mono, Portable.NET</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://crossplatformdotnet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18409291/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://crossplatformdotnet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>David J. McKee</name><uri>http://www.blogger.com/profile/14710499161519006362</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-18409291.post-113172896316731933</id><published>2005-11-11T09:05:00.000-08:00</published><updated>2005-11-11T09:09:23.176-08:00</updated><title type='text'>Getting Started in Linux for the Experienced .NET Developer (Comments)</title><content type='html'>Here are my comments on the SYS-CON FRANCE article titled "Getting Started in Linux for the Experienced .NET Developer" (&lt;a href="http://fr.sys-con.com/read/143299.htm"&gt;http://fr.sys-con.com/read/143299.htm&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Our company is in the process of porting a large .NET application to OS X and Linux using Mono. I’m constantly impressed with how mature the mono platform is, but as you state there is still some work to be done in the WinForms area. For us, the primary goal is to maintain a core code base which is exactly the same on all platforms (Windows, Mac OS X, and Linux) and then to have one or more platform specific assemblies which contain P/Invoke statements, etc. for each disparate OS.&lt;br /&gt;&lt;br /&gt;I’m glad to see that the Mono team is building the new WinForms DLL on the System.Drawing namespace. In our application, which is a GUI application, we have implemented all of our own controls (buttons, tabs, grids, etc.) based on the System.Drawing namespace. It’s not as difficult as it may sound and it allows us to deal with cross platform issues directly.&lt;br /&gt;&lt;br /&gt;I’m sure I speak for millions of Visual Studio.NET developers when I say that I long for the day when I can compile any purely .NET GUI application within Visual Studio and then simply xcopy it to OS X or Linux and see it run without issue.&lt;br /&gt;&lt;br /&gt;If you are a Windows developer and are curious about Linux let me recommend SUSE Linux 10.0. We ALL need to support Novell in any way we can if for no other reason than they started and support the Mono project. Not to mention SUSE Linux 10.0 is arguably the best desktop Linux distribution available.&lt;br /&gt;&lt;br /&gt;One thing I can’t understand is why the Apple people have not jumped on the .NET bandwagon. Don’t they realize that 76% (very conservative estimate, e-week) of the world’s developers are Visual Studio developers? Most software companies write there software first for Windows (90% market share) and then worry about OS X and Linux in “the next version”. Don’t you think that if it were a viable option we would release Windows, Mac OS X, and Linux versions all at the same time?&lt;br /&gt;&lt;br /&gt;Novell, I love you!&lt;br /&gt;&lt;br /&gt;Apple, how about spending some research dollars to support .NET on OS X?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18409291-113172896316731933?l=crossplatformdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crossplatformdotnet.blogspot.com/feeds/113172896316731933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18409291&amp;postID=113172896316731933' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18409291/posts/default/113172896316731933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18409291/posts/default/113172896316731933'/><link rel='alternate' type='text/html' href='http://crossplatformdotnet.blogspot.com/2005/11/getting-started-in-linux-for.html' title='Getting Started in Linux for the Experienced .NET Developer (Comments)'/><author><name>David J. McKee</name><uri>http://www.blogger.com/profile/14710499161519006362</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18409291.post-113172530355982122</id><published>2005-11-11T08:06:00.000-08:00</published><updated>2005-11-11T08:18:08.830-08:00</updated><title type='text'>Hot news for .NET developers wanting to test mono on Linux</title><content type='html'>Here is a valuable article for anyone wanting to try mono on Linux:&lt;br /&gt;&lt;br /&gt;exerpt from "Getting Started in Linux for the Experienced .NET Developer"&lt;br /&gt;...&lt;br /&gt;There is a Live Linux CD specifically for Mono users. The Monoppix live CD (&lt;a href="http://www.monoppix.com/" target="new"&gt;http://www.monoppix.com/&lt;/a&gt;) can be freely downloaded. This is a painless way to test-drive both Linux and Mono without having to build a PC for it.&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;Full article available here.&lt;br /&gt;&lt;a href="http://fr.sys-con.com/read/143299.htm"&gt;http://fr.sys-con.com/read/143299.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18409291-113172530355982122?l=crossplatformdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crossplatformdotnet.blogspot.com/feeds/113172530355982122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18409291&amp;postID=113172530355982122' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18409291/posts/default/113172530355982122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18409291/posts/default/113172530355982122'/><link rel='alternate' type='text/html' href='http://crossplatformdotnet.blogspot.com/2005/11/hot-news-for-net-developers-wanting-to.html' title='Hot news for .NET developers wanting to test mono on Linux'/><author><name>David J. McKee</name><uri>http://www.blogger.com/profile/14710499161519006362</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18409291.post-113113871597538552</id><published>2005-11-04T10:54:00.001-08:00</published><updated>2005-11-04T13:14:29.796-08:00</updated><title type='text'>A better way to output debug information (OS X to Windows XP)</title><content type='html'>I did some snooping into my UDP problem on OS X and found that the problem was not MONO, my code, or OS X, but rather the fact that the Windows XP firewall was turned on preventing the machine I was sending packets to from receiving them. Now I’m sure I’ve turned this off more that once. At any rate, UDP communication between Mac OS X and Windows XP seems to work fine using MONO.&lt;br /&gt;&lt;br /&gt;My plan at present is to send all debug output from my MONO .NET application running on OS X to a Windows box using UDP (udpclient class). I then receive the UDP traffic on the Windows XP box using a .NET service and debug out the information.&lt;br /&gt;&lt;br /&gt;Ultimately I view the WindowsDebugOutput using DebugView a freeware program from SysInternals (&lt;a href="http://www.sysinternals.com/utilities/debugview.html"&gt;http://www.sysinternals.com/utilities/debugview.html&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;This whole process may seem convoluted, but it is also reliable and I’m going to need to debug out a lot of information if I’m going to successfully get this application moved from Windows to Mac.&lt;br /&gt;&lt;br /&gt;So far the only problem I’ve encountered with MONO is that using the TextBox control causes my application to crash. All-in-all the MONO team has done a great job.&lt;br /&gt;&lt;br /&gt;-d&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18409291-113113871597538552?l=crossplatformdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crossplatformdotnet.blogspot.com/feeds/113113871597538552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18409291&amp;postID=113113871597538552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18409291/posts/default/113113871597538552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18409291/posts/default/113113871597538552'/><link rel='alternate' type='text/html' href='http://crossplatformdotnet.blogspot.com/2005/11/better-way-to-output-debug-information.html' title='A better way to output debug information (OS X to Windows XP)'/><author><name>David J. McKee</name><uri>http://www.blogger.com/profile/14710499161519006362</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18409291.post-113113329410097904</id><published>2005-11-04T10:54:00.000-08:00</published><updated>2005-11-04T13:12:49.260-08:00</updated><title type='text'>Prerequisites for WinForms development on OS X</title><content type='html'>As with most large-scale applications, the application I’m attempting to move to OS X is comprised of many individual DLLs. This architecture should be a benefit to me as I will be able to isolate and certify each individual DLL on OS X before attempting to run the entire program.&lt;br /&gt;&lt;br /&gt;I started by creating a test harness for the simplest DLL within my application which contains my standard exception handler, event logging, and other low-level utilities. This DLL is also used by all other DLLs within my system.&lt;br /&gt;&lt;br /&gt;The first problem I encountered was how to capture debug information so I can figure out what is going on under the covers. Since I’m doing all WinForms development I don’t have the benefit of a terminal to debug out information to. There may be a debug output viewer available for OS X, but I’m not aware of one. My solution was to use the standard .NET/Mono debug out statement and implement a custom trace listener.&lt;br /&gt;&lt;br /&gt;Creating a custom trace listener in .NET is a piece of cake as shown below:&lt;br /&gt;&lt;br /&gt;//BEGIN CLASS CODE&lt;br /&gt;&lt;br /&gt;public class DebugOutput : System.Diagnostics.TraceListener&lt;br /&gt;{&lt;br /&gt;public DebugOutput()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public delegate void outputDebugString(string Text);&lt;br /&gt;public event outputDebugString OutputDebugString;&lt;br /&gt;&lt;br /&gt;public override void Write(string info)&lt;br /&gt;{&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;OutputDebugString(info);&lt;br /&gt;}&lt;br /&gt;catch (System.Exception ex)&lt;br /&gt;{&lt;br /&gt;MessageBox.Show(ex.ToString());&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public override void WriteLine(string info)&lt;br /&gt;{&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;OutputDebugString(info);&lt;br /&gt;}&lt;br /&gt;catch (System.Exception ex)&lt;br /&gt;{&lt;br /&gt;MessageBox.Show(ex.ToString());&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//END CLASS CODE&lt;br /&gt;&lt;br /&gt;The next step was to use the custom trace listener in my test harness.&lt;br /&gt;&lt;br /&gt;Step 1: Create the event handler.&lt;br /&gt;private void OutputDebugString(string Text)&lt;br /&gt;{&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;lblDebugOutput.Text = lblDebugOutput.Text +&lt;br /&gt;"NEW STATEMENT:" +&lt;br /&gt;System.Environment.NewLine + Text + System.Environment.NewLine + System.Environment.NewLine;&lt;br /&gt;}&lt;br /&gt;catch (System.Exception ex)&lt;br /&gt;{&lt;br /&gt;MessageBox.Show(ex.ToString());&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Step 2: Initialize the custom trace listener and the event handler.&lt;br /&gt;private DebugOutput m_objDebugOutput = null;&lt;br /&gt;&lt;br /&gt;private void frmTestHarness_Load(object sender, System.EventArgs e)&lt;br /&gt;{&lt;br /&gt;m_objDebugOutput = new DebugOutput();&lt;br /&gt;m_objDebugOutput.OutputDebugString += new&lt;br /&gt;DebugOutput.outputDebugString(OutputDebugString);&lt;br /&gt;System.Diagnostics.Debug.Listeners.Add(m_objDebugOutput);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now I’m able to use debug statements within my application and see them on screen.&lt;br /&gt;&lt;br /&gt;VERY IMPORTANT: When I started this, I attempted to use a TextBox to display the debug output. For some reason, the act of setting text in my TextBox caused my application to immediately crash. Next I tried to send UPD packets to another computer as an alternate way of viewing debug output. This also didn’t work for me. Finally I ended up using a Label. A Label works fine, but I’m going to need to go back later and figure out what the problem is with TextBoxe controls and the UDP client as both of these are used within my application.&lt;br /&gt;&lt;br /&gt;I’m now in the process of verifying that all functions act exactly the same way on both Win32 and OS X.&lt;br /&gt;&lt;br /&gt;More to come.&lt;br /&gt;&lt;br /&gt;-d&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18409291-113113329410097904?l=crossplatformdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crossplatformdotnet.blogspot.com/feeds/113113329410097904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18409291&amp;postID=113113329410097904' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18409291/posts/default/113113329410097904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18409291/posts/default/113113329410097904'/><link rel='alternate' type='text/html' href='http://crossplatformdotnet.blogspot.com/2005/11/prerequisites-for-winforms-development.html' title='Prerequisites for WinForms development on OS X'/><author><name>David J. McKee</name><uri>http://www.blogger.com/profile/14710499161519006362</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18409291.post-113053540298066270</id><published>2005-10-28T14:21:00.000-07:00</published><updated>2005-10-28T14:36:42.986-07:00</updated><title type='text'>Getting Started with Mono on Mac OS X</title><content type='html'>Mono is an amazing technology which promises to allow .NET System.Windows.Forms applications to run unchanged on all supported version of Windows and also Mac OS X and Linux. I’ve been a Windows developer for years and am intrigued by the prospect of writing real-world applications that will run equally well on all of these platforms.&lt;br /&gt;&lt;br /&gt;I’m going to start by migrating a large retail application written in C# to Mac OS X. I’m going to do my best to maintain the same code base for all platforms. If the migration from Windows to Mac is successful, then I’ll move on to Linux.&lt;br /&gt;&lt;br /&gt;Today I was able to get a hello world style WinForms application running on OS X (originally complied on Windows XP).&lt;br /&gt;&lt;br /&gt;I started by downloading and installing the latest version of Mono from the following URL:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mono-project.com/Downloads"&gt;http://www.mono-project.com/Downloads&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Next I used the following getting started guide to get my application running.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://oepapel.blogspot.com/2005/04/windowsforms-and-mac-osx.html"&gt;http://oepapel.blogspot.com/2005/04/windowsforms-and-mac-osx.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;for me the macpack program was a real lifesaver in getting my application up and running. More information on this utility can be found at the following URL:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.joeysmith.com/cgi-bin/man/man2html?macpack+1"&gt;http://www.joeysmith.com/cgi-bin/man/man2html?macpack+1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I can’t wait to see what tomorrow has in store.&lt;br /&gt;&lt;br /&gt;-d&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18409291-113053540298066270?l=crossplatformdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crossplatformdotnet.blogspot.com/feeds/113053540298066270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18409291&amp;postID=113053540298066270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18409291/posts/default/113053540298066270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18409291/posts/default/113053540298066270'/><link rel='alternate' type='text/html' href='http://crossplatformdotnet.blogspot.com/2005/10/getting-started-with-mono-on-mac-os-x.html' title='Getting Started with Mono on Mac OS X'/><author><name>David J. McKee</name><uri>http://www.blogger.com/profile/14710499161519006362</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
