<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://community.sharpdevelop.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Matt Ward : Mono</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/tags/Mono/default.aspx</link><description>Tags: Mono</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 SP2 (Build: 31113.47)</generator><item><title>NuGet Addin for MonoDevelop</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2013/01/07/MonoDevelopNuGetAddin.aspx</link><pubDate>Mon, 07 Jan 2013 18:41:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:44955</guid><dc:creator>MattWard</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/rsscomments.aspx?PostID=44955</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/commentapi.aspx?PostID=44955</wfw:comment><comments>http://community.sharpdevelop.net/blogs/mattward/archive/2013/01/07/MonoDevelopNuGetAddin.aspx#comments</comments><description>&lt;p&gt;It has been a while since &lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2011/01/23/NuGetSupportInSharpDevelop.aspx"&gt;NuGet support was added to SharpDevelop&lt;/a&gt; so, after David Fowler announced that he had got &lt;a href="https://twitter.com/davidfowl/status/276188287721414656"&gt;NuGet building under Mono&lt;/a&gt;, I had a look at porting the SharpDevelop addin over to &lt;a href="http://monodevelop.com"&gt;MonoDevelop&lt;/a&gt; and created a &lt;a href="https://github.com/mrward/monodevelop-nuget-addin"&gt;NuGet addin for MonoDevelop&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://github.com/mrward/monodevelop-nuget-addin"&gt;addin&lt;/a&gt; provides a &lt;strong&gt;Manage Packages dialog&lt;/strong&gt; that you can use to add, remove and update NuGet packages in a similar way to Visual Studio or SharpDevelop. Here is a screenshot of the &lt;strong&gt;Manage Packages dialog&lt;/strong&gt; open in MonoDevelop running on OpenSuse 12.2&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/ManagePackagesDialog.aspx" alt="Manage Packages Dialog with package operation messages" /&gt;&lt;/p&gt;
&lt;p&gt;The addin has been tested with the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MonoDevelop 3.0.5&lt;/li&gt;
&lt;li&gt;Mono 2.10.9&lt;/li&gt;
&lt;li&gt;OpenSuse 12.2&lt;/li&gt;
&lt;li&gt;Windows 7&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The addin uses a &lt;a href="https://github.com/mrward/nuget/tree/monodevelop"&gt;slightly customised version of NuGet.Core&lt;/a&gt; based on the original &lt;a href="http://nuget.codeplex.com/SourceControl/BrowseLatest"&gt;NuGet&amp;#39;s source code&lt;/a&gt; available from the mono-build branch. The source code for this customised NuGet.Core is available on &lt;a href="https://github.com/mrward/nuget/tree/monodevelop"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Getting the Addin&lt;/h2&gt;
&lt;p&gt;The addin&amp;#39;s &lt;a href="https://github.com/mrward/monodevelop-nuget-addin"&gt;source code&lt;/a&gt; is available on &lt;a href="https://github.com/mrward/monodevelop-nuget-addin"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The addin is also provided as a pre-compiled binary available to download from a custom MonoDevelop repository:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mrward.github.com/monodevelop-nuget-addin-repository/3.0.5/main.mrep"&gt;http://mrward.github.com/monodevelop-nuget-addin-repository/3.0.5/main.mrep&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can add this repository to MonoDevelop via the &lt;a href="http://monodevelop.com/Documentation/Installing_Add-ins"&gt;Add-in Manager&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Please note that the addin is a beta release and more work is still to be done.&lt;/p&gt;
&lt;h2&gt;Manage Packages Dialog&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;Manage Packages Dialog&lt;/strong&gt; can be opened from the &lt;strong&gt;Projects&lt;/strong&gt; menu by selecting &lt;strong&gt;Manage NuGet Packages&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;It can also be opened by selecting the &lt;strong&gt;Solution&lt;/strong&gt; window, right clicking either the solution, the project or the project&amp;#39;s references and selecting &lt;strong&gt;Manage NuGet Packages&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;As a NuGet package is installed or uninstalled you can see the package operations that executed by expanding the &lt;strong&gt;Messages&lt;/strong&gt; section near the bottom of the dialog.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/ManagePackagesDialogWithMessages.aspx" alt="Manage Packages Dialog with package operation messages" /&gt;&lt;/p&gt;
&lt;h2&gt;Configuring Package Sources&lt;/h2&gt;
&lt;p&gt;NuGet Package Sources can be configured in MonoDevelop&amp;#39;s options.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/NuGetPackageSourcesOptionsDialog.aspx" alt="Configuring NuGet Package Sources in MonoDevelop&amp;#39;s Options" /&gt;&lt;/p&gt;
&lt;p&gt;In Linux you can open the options dialog by selecting &lt;strong&gt;Preferences&lt;/strong&gt; from the &lt;strong&gt;Edit&lt;/strong&gt; menu. In Windows you can select &lt;strong&gt;Options&lt;/strong&gt; from the &lt;strong&gt;Tools&lt;/strong&gt; menu. In the Options dialog scroll down the categories on the left hand side until you find &lt;strong&gt;NuGet&lt;/strong&gt; and then select &lt;strong&gt;Package Sources&lt;/strong&gt;. Here you can add and remove NuGet package sources.&lt;/p&gt;
&lt;h2&gt;PowerShell&lt;/h2&gt;
&lt;p&gt;Any PowerShell scripts in a NuGet package will be ignored by the addin since Mono does not currently have support for them.&lt;/p&gt;
&lt;p&gt;There have been some attempts to implement PowerShell on Mono starting with Igor Moochnick who created &lt;a href="http://pash.sourceforge.net"&gt;Pash&lt;/a&gt; in 2008. Work on this was picked up &lt;a href="https://launchpad.net/pash"&gt;launchpad.net&lt;/a&gt; by Jonathan Ben-Joseph but that work stopped. The latest effort on bringing PowerShell to Mono is Jay Bazuzi with recent work done on the Pash source code available on &lt;a href="https://github.com/JayBazuzi/Pash2"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://pash.sourceforge.net"&gt;Pash on SourceForge&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://launchpad.net/pash"&gt;Pash on LaunchPad&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/JayBazuzi/Pash2"&gt;Pash2 on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There was also some &lt;a href="http://nuget.codeplex.com/discussions/246658"&gt;discussion in the NuGet forums&lt;/a&gt; on allowing some way of being able to write a &lt;a href="http://nuget.codeplex.com/workitem/720"&gt;.NET version of the PowerShell scripts&lt;/a&gt; (install.ps1, uninstall.ps1 and init.ps1).&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=44955" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/Mono/default.aspx">Mono</category><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/NuGet/default.aspx">NuGet</category><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/MonoDevelop/default.aspx">MonoDevelop</category></item><item><title>Testing with .NET 1.1 in SharpDevelop 2.1</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2006/12/14/TestingWithDotnet11InSharpDevelop21.aspx</link><pubDate>Thu, 14 Dec 2006 21:12:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:13987</guid><dc:creator>MattWard</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/rsscomments.aspx?PostID=13987</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/commentapi.aspx?PostID=13987</wfw:comment><comments>http://community.sharpdevelop.net/blogs/mattward/archive/2006/12/14/TestingWithDotnet11InSharpDevelop21.aspx#comments</comments><description>
&lt;p&gt;SharpDevelop 2.1, as of revision 2135, now allows you to run 
    your unit tests against .NET 1.1 or .NET 2.0.&lt;/p&gt;

&lt;p&gt;Which framework your tests are run under is determined by the 
    target framework your test project. So if you choose .NET 1.1 as 
    your target framework, your tests are run in the .NET 1.1 
    framework. The project's target framework can be set by 
    selecting &lt;b&gt;Project Options&lt;/b&gt; from the &lt;b&gt;Project&lt;/b&gt; menu, then 
    opening the &lt;b&gt;Compiling&lt;/b&gt; tab.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/FeatureTourTargetingDifferentFrameworks.aspx" alt="Target framework options"&gt;&lt;/p&gt;

&lt;p&gt;Only .NET 1.1 and .NET 2.0 are supported, so if you choose 
    another framework, such as one of the Compact Frameworks or Mono 
    SharpDevelop will run your unit tests under .NET 2.0.&lt;/p&gt;

&lt;p&gt;There's currently no support for Mono because our modified 
    nunit-console has a threading problem which happens very frequently 
    under Mono, but never seems to occur under Microsoft's .NET 
    Framework.&lt;/p&gt;
&lt;h2&gt;Running under another .NET Framework&lt;/h2&gt;
&lt;p&gt;Since SharpDevelop recently moved to using nunit-console to run 
    unit tests it was a fairly simple task to make it possible to test 
    against .NET 1.1 or .NET 2.0. It is straight forward because 
    nunit-console can be compiled against .NET 1.1. Since SharpDevelop 
    is launching nunit-console as a separate process we could have used 
    one of the following to target one particular framework.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;app.config&lt;/li&gt;

&lt;li&gt;COMPLUS_Version environment variable&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;App.Config&lt;/h2&gt;
&lt;p&gt;Using an app.config file is the most obvious and well documented 
    way to target a particular framework and is actually how 
    SharpDevelop gets nunit-console to target the different 
    frameworks.&lt;/p&gt;

&lt;p&gt;To run unit tests with .NET 1.1 we have nunit-console.exe built 
    against .NET 1.1 and an app.config file, called 
    nunit-console.exe.config which, contains the following:&lt;/p&gt;
&lt;div id="xml"&gt;
&lt;pre&gt;&amp;lt;configuration&amp;gt;&lt;br&gt;    &amp;lt;!--  &lt;br&gt;        The startup section may be used to specify the runtime versions supported&lt;br&gt;        in the order that they will be used if more than one is present.&lt;br&gt;    --&amp;gt; &lt;br&gt;    &amp;lt;startup&amp;gt; &lt;br&gt;        &amp;lt;supportedRuntime version="v1.1.4322" /&amp;gt; &lt;br&gt;    &amp;lt;/startup&amp;gt; &lt;br&gt;&amp;lt;/configuration&amp;gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Note that the actual nunit-console's actual app.config has 
    some extra things which I have removed in the above example so it 
    just shows what is needed to target a particular framework. The &amp;lt;&lt;a href="http://msdn.microsoft.com/library/en-us/cpgenref/html/gnconSupportedRuntimeElement.asp"&gt;supportedRuntime&lt;/a&gt;&amp;gt; element is used to determine which 
    framework the application is run against.&lt;/p&gt;

&lt;p&gt;To run against .NET 2.0 we use the same copy of nunit-console, 
    built against .NET 1.1, but with an app.config which has .NET 2.0 
    as the supported runtime. When you run the unit tests SharpDevelop 
    looks at the project's target framework and runs the 
    corresponding nunit-console.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;COMPlus_Version&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;With Microsoft's .NET framework you can set the 
    COMPlus_Version environment variable before running your .NET 
    application to run it under a particular framework. So at the 
    command line you could execute&lt;/p&gt;

&lt;p&gt;&lt;b&gt;SET COMPLUS_Version=v1.1.4322&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Then your application would run against .NET 1.1. Specifying a 
    framework in your app.config will override the COMPLUS_Version 
    setting however.&lt;/p&gt;

&lt;p&gt;SharpDevelop does not use this method since using an app.config 
    makes it easy to support running unit tests with 
    &lt;a href="http://ncover.org"&gt;NCover&lt;/a&gt; and the debugger. Using 
    COMPLUS_Version we could not run NCover since it is compiled 
    against .NET 2.0. The debugger would also need to be modified so it 
    could set environment variables before debugging an application.&lt;/p&gt;
&lt;h2&gt;Mono&lt;/h2&gt;
&lt;p&gt;How do we target another framework with Mono? You can use one of 
    the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;app.config&lt;/li&gt;

&lt;li&gt;mono.exe --runtime command line parameter&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Again we can use the app.config file as discussed previously. We 
    can also use the new &lt;b&gt;--runtime&lt;/b&gt; command line parameter that 
    was added in Mono 1.2.2. This works in a similar way to the 
    COMPLUS_Version environment variable allowing you to set the 
    framework version globally. Using the command line&lt;/p&gt;

&lt;p&gt;&lt;b&gt;mono --runtime=v1.1.4322 nunit-console.exe&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;would run nunit-console under Mono's .NET 1.1 framework.&lt;/p&gt;

&lt;p&gt;There is one difference though, specifying the target framework 
    in the app.config does not override this command line setting.&lt;/p&gt;
&lt;h2&gt;Code Coverage with .NET 1.1&lt;/h2&gt;
&lt;p&gt;If you want to look at code coverage when running your unit 
    tests under .NET 1.1 you will need to use 
    &lt;a href="http://ncover.org/SITE/files/4/ncover_setup/entry202.aspx"&gt;
    NCover version 1.5.4&lt;/a&gt; since the latest release 1.5.5 does not 
    work produce any coverage results when profiling a .NET 1.1 
    assembly.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=13987" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/Mono/default.aspx">Mono</category><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/CodeCoverage/default.aspx">CodeCoverage</category><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/UnitTests/default.aspx">UnitTests</category></item><item><title>Targeting Different Frameworks with VB.NET</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2006/02/18/TargetingDifferentFrameworksWithVBNet.aspx</link><pubDate>Sat, 18 Feb 2006 17:09:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:5366</guid><dc:creator>MattWard</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/rsscomments.aspx?PostID=5366</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/commentapi.aspx?PostID=5366</wfw:comment><comments>http://community.sharpdevelop.net/blogs/mattward/archive/2006/02/18/TargetingDifferentFrameworksWithVBNet.aspx#comments</comments><description>SharpDevelop 2.1, revision 1157, allows VB.NET projects to target the older Microsoft Frameworks and Mono. This extends &lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.DanielGrunwald"&gt;Daniel&lt;/a&gt;&amp;#39;s previous work to &lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/15/TargetingDifferentFrameworksWithSharpDevelop.aspx"&gt;target different frameworks with C#&lt;/a&gt;. SharpDevelop 2.1 is only available from the &lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.UsingTheRepository"&gt;repository&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
To target a different framework, open the project&amp;#39;s &amp;quot;Compiling&amp;quot; options (Project | Project Options | Compiling) and select the desired framework from the &lt;a href="http://community.sharpdevelop.net/photos/mattward/images/1248/original.aspx"&gt;&amp;quot;Target Framework&amp;quot; drop down list&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;MonoBASIC&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
When Mono is targeted, the &lt;a href="http://www.mono-project.com/VisualBasic.NET_support"&gt;MonoBASIC compiler&lt;/a&gt; (mbas) will be used.&amp;nbsp; This compiler is still under going a lot development, so there are a few things that are missing or have incomplete support.&amp;nbsp; One omission, for example, is that it will not embed resources into an assembly.&lt;br /&gt;
&lt;br /&gt;
SharpDevelop now contains Gtk# project and file templates for VB.NET.&amp;nbsp; There is no Glade# project template for VB.NET since MonoBASIC does not currently support embedded resources.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Issues&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
There are a few things to be aware of when using SharpDevelop to target the older frameworks.&lt;br /&gt;
&lt;br /&gt;
Code completion for certain core assemblies will only show .NET 2.0 information.&amp;nbsp; These core assemblies are:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;mscorlib&lt;/li&gt;
&lt;li&gt;System&lt;/li&gt;
&lt;li&gt;System.Data&lt;/li&gt;
&lt;li&gt;System.Design&lt;/li&gt;
&lt;li&gt;System.DirectoryServices&lt;/li&gt;
&lt;li&gt;System.Drawing&lt;/li&gt;
&lt;li&gt;System.Web.Services&lt;/li&gt;
&lt;li&gt;System.Windows.Forms&lt;/li&gt;
&lt;li&gt;System.Xml&lt;/li&gt;
&lt;li&gt;Microsoft.Build.Engine&lt;/li&gt;
&lt;li&gt;Microsoft.Build.Framework&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Forms Designer will generate .NET 2.0 code only.&lt;br /&gt;
&lt;br /&gt;
The Forms Designer will generate .NET 2.0 specific resources.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Alternative Solutions&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://weblogs.asp.net/rmclaws/"&gt;Robert McLaws&lt;/a&gt; produced an &lt;a href="http://weblogs.asp.net/rmclaws/archive/2005/06/04/410360.aspx"&gt;MSBuild toolkit&lt;/a&gt; for Visual Studio 2005 RC, but this does not look like it supports the latest version of Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://blogs.msdn.com/jomo_fisher/"&gt;Jomo Fisher&lt;/a&gt; produced a &lt;a href="http://blogs.msdn.com/jomo_fisher/archive/2005/04/22/410903.aspx"&gt;targets file&lt;/a&gt;, for C# projects, that can be used to target the older Microsoft frameworks.&amp;nbsp; This targets file is a sample that supports Visual Studio beta 2.&lt;br /&gt;
&lt;br /&gt;
Microsoft recently released an &lt;a href="http://go.microsoft.com/fwlink/?LinkId=59384"&gt;MSBuild toolkit for .NET 1.1 called MSBee.&lt;/a&gt;&amp;nbsp; This adds support for targeting .NET 1.1 with VB.NET as well as C# projects.&amp;nbsp; It will also generate .NET 1.x resources from .NET 2.0 resx files. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[Update 30 August 2006]&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;From version &lt;a href="http://www.go-mono.com/archive/1.1.17/"&gt;1.1.17&lt;/a&gt; Mono no longer ships with the MonoBASIC compiler. When the new VB compiler for Mono is released SharpDevelop 2.1 will be updated to support it. &lt;br /&gt;&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=5366" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/Mono/default.aspx">Mono</category><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/MSBuild/default.aspx">MSBuild</category></item><item><title>MSBuild and Mono's GAC</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2006/01/11/MSBuildAndMonosGac.aspx</link><pubDate>Wed, 11 Jan 2006 21:13:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:3972</guid><dc:creator>MattWard</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/rsscomments.aspx?PostID=3972</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/commentapi.aspx?PostID=3972</wfw:comment><comments>http://community.sharpdevelop.net/blogs/mattward/archive/2006/01/11/MSBuildAndMonosGac.aspx#comments</comments><description>SharpDevelop2 now supports Mono's GAC, so this post takes a low level look into how it uses MSBuild to do this.&lt;br /&gt;&lt;br /&gt;Our starting point is a previous &lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/15/CustomMSBuildTasksForMono.aspx"&gt;Custom MSBuild Targets for Mono&lt;/a&gt; post, which introduced an MSBuild task (Mcs), which was used to compile the code using Mono's Mcs compiler, and an MSBuild targets file (Mono.Mcs.targets).&amp;nbsp; We will be using the ICSharpCode.Build.Tasks assembly that ships with SharpDevelop2 which contains the custom MSBuild tasks.&amp;nbsp; We will not be using the SharpDevelop2's target files since these target more than just the Mono framework.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Mono GAC References&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The original custom MSBuild task and targets file did not support Mono GAC references.&amp;nbsp; In fact they were the bare minimum required to compile code using Mcs.&amp;nbsp; The only MSBuild target that was overridden was the CoreCompile target, which was changed to use the Mcs task instead of Microsoft's Csc task.&amp;nbsp; Without support for Mono's GAC any assembly references needed to have a HintPath&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;Reference&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Include&lt;/font&gt;&lt;font color="Blue"&gt;="gtk-sharp"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;HintPath&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;..\..\Program&amp;nbsp;Files\Mono\lib\mono\gtk-sharp\gtk-sharp.dll&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/HintPath&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;font color="DarkMagenta"&gt;&amp;lt;/Reference&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;/font&gt;&lt;br /&gt;In order to add support for Mono's GAC we will need to look at the following Microsoft targets and properties:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;AssemblySearchPaths&lt;/li&gt;&lt;li&gt;GetFrameworkPaths&lt;/li&gt;&lt;li&gt;ResolveAssemblyReferences&lt;/li&gt;&lt;/ul&gt;First let us see if we can get a simple GAC reference to System.Xml to work.&amp;nbsp; With the old tasks and targets a reference of the form&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;Reference&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Include&lt;/font&gt;&lt;font color="Blue"&gt;="System.Xml"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;br /&gt;is resolved to "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll".&lt;br /&gt;&lt;br /&gt;To fix this we need to override the GetFrameworkPaths target and set the TargetFrameworkDirectory property&amp;nbsp; correctly.&amp;nbsp; This can be done by adding the following to the Mono.Mcs.targets file&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;Target &lt;/font&gt;&lt;font color="Red"&gt;Name&lt;/font&gt;&lt;font color="Blue"&gt;="GetFrameworkPaths"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;&amp;lt;!--&amp;nbsp;Get&amp;nbsp;the&amp;nbsp;path&amp;nbsp;to&amp;nbsp;the&amp;nbsp;target&amp;nbsp;Mono&amp;nbsp;Framework&amp;nbsp;directory.&amp;nbsp;--&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;GetMonoFrameworkPath&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TargetFrameworkVersion&lt;/font&gt;&lt;font color="Blue"&gt;="Mono&amp;nbsp;v1.1"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Output&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskParameter&lt;/font&gt;&lt;font color="Blue"&gt;="Path"&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;PropertyName&lt;/font&gt;&lt;font color="Blue"&gt;="TargetFrameworkDirectory"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Output&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskParameter&lt;/font&gt;&lt;font color="Blue"&gt;="Path"&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;ItemName&lt;/font&gt;&lt;font color="Blue"&gt;="_TargetFrameworkDirectoryItem"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/GetMonoFrameworkPath&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;&amp;lt;!--&amp;nbsp;Get&amp;nbsp;the&amp;nbsp;path&amp;nbsp;to&amp;nbsp;the&amp;nbsp;target&amp;nbsp;the&amp;nbsp;Mono&amp;nbsp;SDK&amp;nbsp;directory.&amp;nbsp;--&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;GetMonoFrameworkSDKPath&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Output&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskParameter&lt;/font&gt;&lt;font color="Blue"&gt;="Path"&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;PropertyName&lt;/font&gt;&lt;font color="Blue"&gt;="TargetFrameworkSDKDirectory"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Output&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskParameter&lt;/font&gt;&lt;font color="Blue"&gt;="Path"&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;ItemName&lt;/font&gt;&lt;font color="Blue"&gt;="_TargetFrameworkSDKDirectoryItem"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/GetMonoFrameworkSDKPath&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;font color="DarkMagenta"&gt;&amp;lt;/Target&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;This override must come after the&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;Import&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Project&lt;/font&gt;&lt;font color="Blue"&gt;="$(MSBuildBinPath)\Microsoft.Common.targets"&amp;nbsp;&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;
&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;statement, so this should be moved to the beginning of the Mono.Mcs.targets file.&amp;nbsp; It also uses two custom&amp;nbsp; tasks that need to be made known to MSBuild&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;UsingTask&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskName&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.GetMonoFrameworkPath"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;AssemblyFile&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.dll"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;font color="DarkMagenta"&gt;&amp;lt;UsingTask&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskName&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.GetMonoFrameworkSdkPath"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;AssemblyFile&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.dll"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;
&lt;/font&gt;&amp;nbsp;&lt;br /&gt;The GetFrameworkPaths target sets a few more things than just the TargetFrameworkDirectory, this is done for completeness based on what the Microsoft.Common.targets file does, but only the TargetFrameworkDirectory property needs to be set.&amp;nbsp; The TargetFrameworkDirectory is set by calling the GetMonoFrameworkPath task and passing in the target framework version, which in this case is "Mono v1.1".&amp;nbsp; This task uses the registry to locate the Mono framework directory (e.g. "C:\Program Files\Mono\lib\mono\1.0").&lt;br /&gt;&lt;br /&gt;&lt;b&gt;AssemblySearchPaths and ResolveAssemblyReference&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now what about an assembly that only exists in Mono's GAC and cannot be found in Mono framework's directory?&amp;nbsp; A reference to glib-sharp is a good place to start.&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;Reference&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Include&lt;/font&gt;&lt;font color="Blue"&gt;="glib-sharp,&amp;nbsp;Version=1.0.0.0,&amp;nbsp;Culture=neutral,&amp;nbsp;PublicKeyToken=35e10195dab3c99f"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;/font&gt;&lt;br /&gt;We need to modify the AssemblySearchPaths which is being passed to the ResolveAssemblyReference task.&amp;nbsp; In the Microsoft's target files this is defined as:&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;&amp;lt;!--&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;The&amp;nbsp;SearchPaths&amp;nbsp;property&amp;nbsp;is&amp;nbsp;set&amp;nbsp;to&amp;nbsp;find&amp;nbsp;assemblies&amp;nbsp;in&amp;nbsp;the&amp;nbsp;following&amp;nbsp;order:&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;(1)&amp;nbsp;Files&amp;nbsp;from&amp;nbsp;current&amp;nbsp;project&amp;nbsp;-&amp;nbsp;indicated&amp;nbsp;by&amp;nbsp;{CandidateAssemblyFiles}&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;(2)&amp;nbsp;$(ReferencePath)&amp;nbsp;-&amp;nbsp;the&amp;nbsp;reference&amp;nbsp;path&amp;nbsp;property,&amp;nbsp;which&amp;nbsp;comes&amp;nbsp;from&amp;nbsp;the&amp;nbsp;.USER&amp;nbsp;file.&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;(3)&amp;nbsp;The&amp;nbsp;hintpath&amp;nbsp;from&amp;nbsp;the&amp;nbsp;referenced&amp;nbsp;item&amp;nbsp;itself,&amp;nbsp;indicated&amp;nbsp;by&amp;nbsp;{HintPathFromItem}.&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;(4)&amp;nbsp;The&amp;nbsp;directory&amp;nbsp;of&amp;nbsp;MSBuild's&amp;nbsp;"target"&amp;nbsp;runtime&amp;nbsp;from&amp;nbsp;GetFrameworkPath.&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;The&amp;nbsp;"target"&amp;nbsp;runtime&amp;nbsp;folder&amp;nbsp;is&amp;nbsp;the&amp;nbsp;folder&amp;nbsp;of&amp;nbsp;the&amp;nbsp;runtime&amp;nbsp;that&amp;nbsp;MSBuild&amp;nbsp;is&amp;nbsp;a&amp;nbsp;part&amp;nbsp;of.&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;(5)&amp;nbsp;Registered&amp;nbsp;assembly&amp;nbsp;folders,&amp;nbsp;indicated&amp;nbsp;by&amp;nbsp;{Registry:*,*,*}&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;(6)&amp;nbsp;Legacy&amp;nbsp;registered&amp;nbsp;assembly&amp;nbsp;folders,&amp;nbsp;indicated&amp;nbsp;by&amp;nbsp;{AssemblyFolders}&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;(7)&amp;nbsp;Look&amp;nbsp;in&amp;nbsp;the&amp;nbsp;application's&amp;nbsp;output&amp;nbsp;folder&amp;nbsp;(like&amp;nbsp;bin\debug)&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;(8)&amp;nbsp;Resolve&amp;nbsp;to&amp;nbsp;the&amp;nbsp;GAC.&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;(9)&amp;nbsp;Treat&amp;nbsp;the&amp;nbsp;reference's&amp;nbsp;Include&amp;nbsp;as&amp;nbsp;if&amp;nbsp;it&amp;nbsp;were&amp;nbsp;a&amp;nbsp;real&amp;nbsp;file&amp;nbsp;name.&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;--&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;AssemblySearchPaths&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Condition&lt;/font&gt;&lt;font color="Blue"&gt;="&amp;nbsp;'$(AssemblySearchPaths)'&amp;nbsp;==&amp;nbsp;''&amp;nbsp;"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{CandidateAssemblyFiles};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;$(ReferencePath);&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{HintPathFromItem};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{TargetFrameworkDirectory};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{AssemblyFolders};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{GAC};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{RawFileName};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;$(OutputPath)&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/AssemblySearchPaths&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;
&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;/font&gt;&lt;br /&gt;The {Registry} part is Microsoft specific and can be removed for Mono.&amp;nbsp; The {GAC} part is also Microsoft specific.&amp;nbsp; When the ResolveAssemblyReference task encounters this string it knows to look in Microsoft's GAC.&amp;nbsp; We will replace this with {MonoGAC} which Microsoft's ResolveAssemblyReference task knows nothing about.&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;AssemblySearchPaths&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{CandidateAssemblyFiles};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;$(ReferencePath);&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{HintPathFromItem};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{TargetFrameworkDirectory};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{AssemblyFolders};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{MonoGAC};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{RawFileName};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;$(OutputPath)&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/AssemblySearchPaths&amp;gt;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;
&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;/font&gt;&lt;br /&gt;Now we need to somehow replace the {MonoGAC} with a set of directories.&amp;nbsp; We could write our own ResolveAssemblyReference task, but this seems like a lot of work.&amp;nbsp; Instead let us update the AssemblySearchPaths just before the ResolveAssemblyReference task is called.&amp;nbsp; We do this by overriding the ResolveAssemblyReferenceDependsOn target and making it call our custom AddMonoAssemblySearchPaths target.&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;ResolveAssemblyReferencesDependsOn&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;GetFrameworkPaths;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;GetRedistLists;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;PrepareForBuild;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;AddMonoAssemblySearchPaths&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/ResolveAssemblyReferencesDependsOn&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;font color="DarkMagenta"&gt;&amp;lt;Target&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Name&lt;/font&gt;&lt;font color="Blue"&gt;="AddMonoAssemblySearchPaths"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;AddMonoAssemblySearchPaths&amp;nbsp;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Assemblies&lt;/font&gt;&lt;font color="Blue"&gt;="@(Reference)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Paths&lt;/font&gt;&lt;font color="Blue"&gt;="$(AssemblySearchPaths)"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Output&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskParameter&lt;/font&gt;&lt;font color="Blue"&gt;="Paths"&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;PropertyName&lt;/font&gt;&lt;font color="Blue"&gt;="AssemblySearchPaths"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/AddMonoAssemblySearchPaths&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;font color="DarkMagenta"&gt;&amp;lt;/Target&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;/font&gt;&lt;br /&gt;Again this custom task needs to be included via&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;UsingTask&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskName&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.AddMonoAssemblySearchPaths"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;AssemblyFile&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.dll"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;/font&gt;&lt;br /&gt;The AddMonoAssemblySearchPath task looks for the {MonoGAC} item in the AssemblySearchPaths property and replaces it with any Mono GAC directories that need to be searched.&amp;nbsp; The GAC directories are determined by looking at the assembly references passed in via the Assemblies property.&amp;nbsp; If multiple GAC references are located then multiple directories are inserted into the AssemblySearchPaths property.&lt;br /&gt;&lt;br /&gt;Now we can use MSBuild to build a project with references to assemblies in Mono's GAC using SharpDevelop2's ICSharpCode.Build.Tasks assembly and the Mono.Mcs.targets file.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Mono.Mcs.targets&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;Project&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;xmlns&lt;/font&gt;&lt;font color="Blue"&gt;="http://schemas.microsoft.com/developer/msbuild/2003"&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;DefaultTargets&lt;/font&gt;&lt;font color="Blue"&gt;="Build"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Import&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Project&lt;/font&gt;&lt;font color="Blue"&gt;="$(MSBuildBinPath)\Microsoft.Common.targets"&amp;nbsp;&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;UsingTask&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskName&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.Mcs"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;AssemblyFile&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.dll"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;UsingTask&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskName&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.GetMonoFrameworkPath"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;AssemblyFile&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.dll"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;UsingTask&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskName&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.GetMonoFrameworkSdkPath"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;AssemblyFile&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.dll"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;UsingTask&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskName&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.AddMonoAssemblySearchPaths"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;AssemblyFile&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.dll"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;MSBuildAllProjects&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;$(MSBuildAllProjects);Mono.Mcs.targets&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/MSBuildAllProjects&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;DefaultLanguageSourceExtension&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;.cs&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/DefaultLanguageSourceExtension&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Language&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;C#&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/Language&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Target&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Name&lt;/font&gt;&lt;font color="Blue"&gt;="CreateManifestResourceNames"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;DebugSymbols&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Condition&lt;/font&gt;&lt;font color="Blue"&gt;="&amp;nbsp;'$(DebugType)'&amp;nbsp;==&amp;nbsp;'none'&amp;nbsp;"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;false&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/DebugSymbols&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;DebugType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Condition&lt;/font&gt;&lt;font color="Blue"&gt;="&amp;nbsp;'$(DebugType)'&amp;nbsp;==&amp;nbsp;'none'&amp;nbsp;"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&amp;lt;/DebugType&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;ItemGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;DocFileItem&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Include&lt;/font&gt;&lt;font color="Blue"&gt;="$(DocumentationFile)"&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Condition&lt;/font&gt;&lt;font color="Blue"&gt;="'$(DocumentationFile)'!=''"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;InProject&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;false&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/InProject&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/DocFileItem&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/ItemGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;CoreCompileDependsOn&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;_ComputeNonExistentFileProperty&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/CoreCompileDependsOn&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;&amp;lt;!--&amp;nbsp;Override&amp;nbsp;AssemblySearchPaths&amp;nbsp;property&amp;nbsp;and&amp;nbsp;remove&amp;nbsp;Microsoft&amp;nbsp;specific&amp;nbsp;search&amp;nbsp;paths&amp;nbsp;--&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;AssemblySearchPaths&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{CandidateAssemblyFiles};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;$(ReferencePath);&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{HintPathFromItem};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{TargetFrameworkDirectory};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{AssemblyFolders};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{MonoGAC};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;{RawFileName};&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;$(OutputPath)&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/AssemblySearchPaths&amp;gt;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;&amp;lt;!--&amp;nbsp;Modify&amp;nbsp;what&amp;nbsp;the&amp;nbsp;ResolveAssemblyReferences&amp;nbsp;tasks&amp;nbsp;depends&amp;nbsp;on&amp;nbsp;so&amp;nbsp;the&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;AssemblySearchPaths&amp;nbsp;can&amp;nbsp;be&amp;nbsp;modified&amp;nbsp;to&amp;nbsp;use&amp;nbsp;the&amp;nbsp;Mono&amp;nbsp;GAC&amp;nbsp;--&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;ResolveAssemblyReferencesDependsOn&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;GetFrameworkPaths;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;GetRedistLists;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;PrepareForBuild;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;AddMonoAssemblySearchPaths&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/ResolveAssemblyReferencesDependsOn&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Target&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Name&lt;/font&gt;&lt;font color="Blue"&gt;="AddMonoAssemblySearchPaths"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;AddMonoAssemblySearchPaths&amp;nbsp;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Assemblies&lt;/font&gt;&lt;font color="Blue"&gt;="@(Reference)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Paths&lt;/font&gt;&lt;font color="Blue"&gt;="$(AssemblySearchPaths)"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Output&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskParameter&lt;/font&gt;&lt;font color="Blue"&gt;="Paths"&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;PropertyName&lt;/font&gt;&lt;font color="Blue"&gt;="AssemblySearchPaths"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/AddMonoAssemblySearchPaths&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/Target&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Target&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Name&lt;/font&gt;&lt;font color="Blue"&gt;="GetFrameworkPaths"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;&amp;lt;!--&amp;nbsp;Get&amp;nbsp;the&amp;nbsp;path&amp;nbsp;to&amp;nbsp;the&amp;nbsp;target&amp;nbsp;Mono&amp;nbsp;Framework&amp;nbsp;directory.&amp;nbsp;--&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;GetMonoFrameworkPath&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TargetFrameworkVersion&lt;/font&gt;&lt;font color="Blue"&gt;="Mono&amp;nbsp;v1.1"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Output&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskParameter&lt;/font&gt;&lt;font color="Blue"&gt;="Path"&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;PropertyName&lt;/font&gt;&lt;font color="Blue"&gt;="TargetFrameworkDirectory"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Output&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskParameter&lt;/font&gt;&lt;font color="Blue"&gt;="Path"&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;ItemName&lt;/font&gt;&lt;font color="Blue"&gt;="_TargetFrameworkDirectoryItem"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/GetMonoFrameworkPath&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkSlateGray"&gt;&amp;lt;!--&amp;nbsp;Get&amp;nbsp;the&amp;nbsp;path&amp;nbsp;to&amp;nbsp;the&amp;nbsp;target&amp;nbsp;the&amp;nbsp;Mono&amp;nbsp;SDK&amp;nbsp;directory.&amp;nbsp;--&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;GetMonoFrameworkSDKPath&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Output&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskParameter&lt;/font&gt;&lt;font color="Blue"&gt;="Path"&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;PropertyName&lt;/font&gt;&lt;font color="Blue"&gt;="TargetFrameworkSDKDirectory"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Output&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskParameter&lt;/font&gt;&lt;font color="Blue"&gt;="Path"&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;ItemName&lt;/font&gt;&lt;font color="Blue"&gt;="_TargetFrameworkSDKDirectoryItem"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/GetMonoFrameworkSDKPath&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/Target&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Target&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Name&lt;/font&gt;&lt;font color="Blue"&gt;="CoreCompile"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Inputs&lt;/font&gt;&lt;font color="Blue"&gt;="$(MSBuildAllProjects);&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;@(Compile);&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;@(ManifestResourceWithNoCulture);&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;$(ApplicationIcon);&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;$(AssemblyOriginatorKeyFile);&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;@(ManifestNonResxWithNoCultureOnDisk);&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;@(ReferencePath);&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;@(CompiledLicenseFile)&lt;/font&gt;&lt;font color="Blue"&gt;"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Outputs&lt;/font&gt;&lt;font color="Blue"&gt;="@(DocFileItem);&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;@(IntermediateAssembly);&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;$(NonExistentFile)&lt;/font&gt;&lt;font color="Blue"&gt;"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;DependsOnTargets&lt;/font&gt;&lt;font color="Blue"&gt;="$(CoreCompileDependsOn)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Mcs&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;AdditionalLibPaths&lt;/font&gt;&lt;font color="Blue"&gt;="$(AdditionalLibPaths)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;AddModules&lt;/font&gt;&lt;font color="Blue"&gt;="@(AddModules)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;AllowUnsafeBlocks&lt;/font&gt;&lt;font color="Blue"&gt;="$(AllowUnsafeBlocks)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;CheckForOverflowUnderflow&lt;/font&gt;&lt;font color="Blue"&gt;="$(CheckForOverflowUnderflow)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;CodePage&lt;/font&gt;&lt;font color="Blue"&gt;="$(CodePage)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;DebugType&lt;/font&gt;&lt;font color="Blue"&gt;="$(DebugType)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;DefineConstants&lt;/font&gt;&lt;font color="Blue"&gt;="$(DefineConstants)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;DelaySign&lt;/font&gt;&lt;font color="Blue"&gt;="$(DelaySign)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;DisabledWarnings&lt;/font&gt;&lt;font color="Blue"&gt;="$(NoWarn)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;DocumentationFile&lt;/font&gt;&lt;font color="Blue"&gt;="@(DocFileItem)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;EmitDebugInformation&lt;/font&gt;&lt;font color="Blue"&gt;="$(DebugSymbols)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;KeyContainer&lt;/font&gt;&lt;font color="Blue"&gt;="$(KeyContainerName)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;KeyFile&lt;/font&gt;&lt;font color="Blue"&gt;="$(KeyOriginatorFile)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;LangVersion&lt;/font&gt;&lt;font color="Blue"&gt;="$(LangVersion)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;MainEntryPoint&lt;/font&gt;&lt;font color="Blue"&gt;="$(StartupObject)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;NoConfig&lt;/font&gt;&lt;font color="Blue"&gt;="true"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;NoLogo&lt;/font&gt;&lt;font color="Blue"&gt;="$(NoLogo)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;NoStandardLib&lt;/font&gt;&lt;font color="Blue"&gt;="$(NoStdLib)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Optimize&lt;/font&gt;&lt;font color="Blue"&gt;="$(Optimize)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;OutputAssembly&lt;/font&gt;&lt;font color="Blue"&gt;="@(IntermediateAssembly)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;References&lt;/font&gt;&lt;font color="Blue"&gt;="@(ReferencePath)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Resources&lt;/font&gt;&lt;font color="Blue"&gt;="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;ResponseFiles&lt;/font&gt;&lt;font color="Blue"&gt;="$(CompilerResponseFile)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Sources&lt;/font&gt;&lt;font color="Blue"&gt;="@(Compile)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;TargetType&lt;/font&gt;&lt;font color="Blue"&gt;="$(OutputType)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;ToolPath&lt;/font&gt;&lt;font color="Blue"&gt;="$(McsToolPath)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;TreatWarningsAsErrors&lt;/font&gt;&lt;font color="Blue"&gt;="$(TreatWarningsAsErrors)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;WarningLevel&lt;/font&gt;&lt;font color="Blue"&gt;="$(WarningLevel)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Win32Icon&lt;/font&gt;&lt;font color="Blue"&gt;="$(ApplicationIcon)"&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Win32Resource&lt;/font&gt;&lt;font color="Blue"&gt;="$(Win32Resource)"&amp;nbsp;&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/Target&amp;gt;&lt;/font&gt;&lt;br /&gt;
&lt;font color="DarkMagenta"&gt;&amp;lt;/Project&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=3972" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/Mono/default.aspx">Mono</category><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/MSBuild/default.aspx">MSBuild</category></item><item><title>SharpDevelop2 and Mono's GAC</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2006/01/10/SharpDevelop2AndMonosGac.aspx</link><pubDate>Tue, 10 Jan 2006 13:43:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:3915</guid><dc:creator>MattWard</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/rsscomments.aspx?PostID=3915</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/commentapi.aspx?PostID=3915</wfw:comment><comments>http://community.sharpdevelop.net/blogs/mattward/archive/2006/01/10/SharpDevelop2AndMonosGac.aspx#comments</comments><description>In revision 983 SharpDevelop2 has support for Mono's GAC.&amp;nbsp; It also includes new Gtk# and Glade# project templates, and a Gtk# Window file template.&amp;nbsp; Mono can be downloaded from &lt;a href="http://www.mono-project.com/Downloads"&gt;here&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Creating a new Glade# Project&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Select the menu option File | New | Solution to open the "New Project" dialog. &lt;/li&gt;&lt;li&gt;Select the C# category.&lt;/li&gt;&lt;li&gt;There are two new projects here, a Gtk# project and a Glade# project.&amp;nbsp; Select the Glade# project.&lt;br /&gt;&lt;br /&gt;&lt;img src="/photos/mattward/images/3914/original.aspx" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Enter a name for the project and select the "Create" button to generate the project.&lt;br /&gt;&lt;br /&gt;&lt;img src="/photos/mattward/images/3913/original.aspx" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;The generated project will target Mono 1.1 by default, and will use Mono's Mcs compiler.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Running the Glade# Application&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you have the Mono bin directory (e.g. C:\Program Files\Mono\bin) added to your Path environment variable, the project can be started by selecting the menu option Debug | Run or Debug | Run without debugger. This will run the application under the Microsoft .NET framework and not Mono itself, to run under Mono see this &lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/12/SharpDevelopAndMono.aspx"&gt;post&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Note that you cannot debug the application when it is built with either of the Mono compilers.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Adding a Mono GAC Reference&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Open the Project Browser via View | Project.&lt;/li&gt;&lt;li&gt;Select the "References" node, right click and select "Add Mono Reference".&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;img src="/photos/mattward/images/3912/original.aspx" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Select the GAC entry that will be added to the project, click the
Select button and then click the OK button to add the reference to the
project. &lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;img src="/photos/mattward/images/3911/original.aspx" /&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Code Completion&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;There is a small problem with code auto-completion.&amp;nbsp; In order for auto-completion to work the reference must be added via the "Add Mono Reference" dialog.&amp;nbsp; So the first time a Glade# or Gtk# project has been created you will have to remove the GAC references and then re-add them to get code auto-completion working.&amp;nbsp; This only needs to be done once, not every time a Gtk# or Glade# project is created. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Debugging a Mono Application&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You cannot debug a Mono app built using Mcs or Gmcs.&amp;nbsp; The Mono compilers create their own open source debugging symbols binary (.mdb) which SharpDevelop and Microsoft's DbgCLR do not support.&amp;nbsp; There is also no Mono debugger available for Windows.&amp;nbsp; In order to debug a Mono app it needs to be built using the Microsoft Csc compiler.&amp;nbsp; The general guidelines to be able to debug your Mono app using the SharpDevelop debugger are:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Make sure all Mono specific GAC references have "Local Copy" set to
true.&amp;nbsp; Select the reference in the Project Browser and select
Properties to set this.&lt;/li&gt;&lt;li&gt;The Mono bin directory (e.g. C:\Program Files\Mono\bin) must be added to the Path environment variable.&lt;/li&gt;&lt;li&gt;Change the "Target Framework" (Project | Project Options | Compiling) to one of the Microsoft .NET frameworks.&lt;/li&gt;&lt;li&gt;Remove and re-add your Mono GAC references using the "Add Mono
Reference" dialog.&amp;nbsp; You should only need to do this once and only if
you are using a project created from the Glade# or Gtk# templates.&amp;nbsp;
Doing this will add a HintPath to the references in your MSBuild
project so the Microsoft compilers can locate the assemblies in the
Mono GAC.&amp;nbsp; These HintPaths are not currently added to a newly created
Glade/Gtk# project.&lt;/li&gt;&lt;li&gt;Rebuild your application.&lt;/li&gt;&lt;/ol&gt;Once the HintPaths have been added to your MSBuild project you should be able to switch between the Microsoft and Mono frameworks as required, and build your code using the Microsoft or Mono compilers.&lt;br /&gt;&lt;br /&gt;If you are going to debug a Gtk# or Glade# application you will need to add extra GAC references.&amp;nbsp; Mcs and Gmcs do not need all Gtk# references to be added, but Microsoft's Csc compiler does.&amp;nbsp; For a Gtk# app you will need at least:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;atk-sharp&lt;/li&gt;&lt;li&gt;gdk-sharp&lt;/li&gt;&lt;li&gt;glib-sharp&lt;/li&gt;&lt;li&gt;gtk-sharp&lt;/li&gt;&lt;li&gt;pango-sharp&lt;/li&gt;&lt;/ul&gt;Also add glade-sharp if you are developing a Glade# app.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Links&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mono-project.com/Downloads"&gt;Mono Downloads&lt;/a&gt;&lt;br /&gt;&lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/12/SharpDevelopAndMono.aspx"&gt;Targeting Mono with SharpDevelop2&lt;/a&gt;&lt;br /&gt;&lt;a href="http://build.sharpdevelop.net/BuildArtefacts/"&gt;SharpDevelop Daily Builds&lt;/a&gt;&lt;br /&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=3915" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/Mono/default.aspx">Mono</category></item><item><title>Creating a Gtk# App with SharpDevelop 2.0 Using Glade</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/20/CreatingAGtkSharpAppWithSharpDevelop.aspx</link><pubDate>Thu, 20 Oct 2005 15:40:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:1432</guid><dc:creator>MattWard</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/rsscomments.aspx?PostID=1432</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/commentapi.aspx?PostID=1432</wfw:comment><comments>http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/20/CreatingAGtkSharpAppWithSharpDevelop.aspx#comments</comments><description>&lt;p&gt;The starting point is the Glade xml file.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Glade xml file&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;This was created using the Glade UI Builder that ships with the Mono installer. The xml file specifies the UI components and signals (events) for these components. In our case the main components we have are a mainWindow and a messageLabel. There is also a delete_event signal defined for the main window named MainWindowDeleteEvent.&lt;/p&gt;&lt;font face="Courier New" size="2"&gt;&lt;font color="blue"&gt;&amp;lt;?xml&amp;nbsp;version="1.0"&amp;nbsp;standalone="no"?&amp;gt;&amp;nbsp;&lt;/font&gt;&lt;font color="darkslategray"&gt;&amp;lt;!--*-&amp;nbsp;mode:&amp;nbsp;xml&amp;nbsp;-*--&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="blue"&gt;&amp;lt;!DOCTYPE&amp;nbsp;glade-interface&amp;nbsp;SYSTEM&amp;nbsp;"http://glade.gnome.org/glade-2.0.dtd"&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="darkmagenta"&gt;&amp;lt;glade-interface&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="darkmagenta"&gt;&amp;lt;widget&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;class&lt;/font&gt;&lt;font color="blue"&gt;="GtkWindow"&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;id&lt;/font&gt;&lt;font color="blue"&gt;="mainWindow"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="visible"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;True&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="title"&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;translatable&lt;/font&gt;&lt;font color="blue"&gt;="yes"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;Hello,&amp;nbsp;Gtk#&amp;nbsp;World&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="type"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;GTK_WINDOW_TOPLEVEL&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="window_position"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;GTK_WIN_POS_NONE&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="modal"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;False&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="default_width"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="darkblue"&gt;300&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="default_height"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="darkblue"&gt;300&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="resizable"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;True&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="destroy_with_parent"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;False&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="decorated"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;True&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="skip_taskbar_hint"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;False&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="skip_pager_hint"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;False&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="type_hint"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;GDK_WINDOW_TYPE_HINT_NORMAL&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="gravity"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;GDK_GRAVITY_NORTH_WEST&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;signal&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="delete_event"&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;handler&lt;/font&gt;&lt;font color="blue"&gt;="MainWindowDeleteEvent"&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;last_modification_time&lt;/font&gt;&lt;font color="blue"&gt;="Thu,&amp;nbsp;20&amp;nbsp;Oct&amp;nbsp;2005&amp;nbsp;13:24:07&amp;nbsp;GMT"&lt;/font&gt;&lt;font color="darkmagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;child&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;widget&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;class&lt;/font&gt;&lt;font color="blue"&gt;="GtkLabel"&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;id&lt;/font&gt;&lt;font color="blue"&gt;="messageLabel"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="visible"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;True&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="label"&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;translatable&lt;/font&gt;&lt;font color="blue"&gt;="yes"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;Message&amp;nbsp;here...&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="use_underline"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;False&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="use_markup"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;False&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="justify"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;GTK_JUSTIFY_LEFT&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="wrap"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;False&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="selectable"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;False&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="xalign"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="darkblue"&gt;0.5&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="yalign"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="darkblue"&gt;0.5&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="xpad"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="darkblue"&gt;0&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;property&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;name&lt;/font&gt;&lt;font color="blue"&gt;="ypad"&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="darkblue"&gt;0&lt;/font&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;/widget&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="darkmagenta"&gt;&amp;lt;/child&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/widget&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="darkmagenta"&gt;&amp;lt;/glade-interface&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;
&lt;p&gt;Now we need to create a SharpDevelop project to add this Glade xml file to.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Create a new empty project&lt;/b&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select File | New | Solution to open the "New Project" dialog. 
&lt;/li&gt;&lt;li&gt;Select the C# category and the "Empty Project" template. Enter in project name "HelloGtkWorld" and choose a location. Click the "Create" button to create your empty project.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;Remove all unwanted assembly references&lt;/b&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select View | Projects to open up the project browser. 
&lt;/li&gt;&lt;li&gt;Expand the tree so the assembly references are displayed. There should be two, System and System.Xml. Select one at a time, right click and select "Remove". Repeat until all references have been removed.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;Add a Glade xml file to the project&lt;/b&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select the project tree node, right click and select Add | New Item... to open the "New File" dialog. 
&lt;/li&gt;&lt;li&gt;Select the Misc category and the "Empty XML file" template. Type in the name "glade.xml" and click the "Create" button. 
&lt;/li&gt;&lt;li&gt;Modify the glade.xml file so it contains the xml shown above. 
&lt;/li&gt;&lt;li&gt;Embed this xml file as a resource. Select the file in the Project Browser. Select the menu View | Properties. Change the "Build action" to "EmbeddedResource".&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;Create a new C# class that will be the main entry point for the application&lt;/b&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the project browser again. Select the project tree node, right click and select Add | New Item... to open the "New File" dialog. 
&lt;/li&gt;&lt;li&gt;Select the C# category and the Class template. Type in the filename GladeApp.cs and click the "Create" button to add the new C# class file to the project. 
&lt;/li&gt;&lt;li&gt;This file should be opened when created. Modify the code so the file contains:&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;font color="green"&gt;using&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;Glade&lt;/font&gt;&lt;font color="darkgreen"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;font color="green"&gt;using&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;Gtk&lt;/font&gt;&lt;font color="darkgreen"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;font color="green"&gt;using&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;System&lt;/font&gt;&lt;font color="darkgreen"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="blue"&gt;public&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;class&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;GladeApp&lt;/font&gt;&lt;br /&gt;&lt;font color="darkgreen"&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkgreen"&gt;[&lt;/font&gt;&lt;font color="#000000"&gt;Widget&lt;/font&gt;&lt;font color="darkgreen"&gt;]&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;Label&amp;nbsp;messageLabel&lt;/font&gt;&lt;font color="darkgreen"&gt;;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;public&amp;nbsp;&lt;/font&gt;&lt;font color="brown"&gt;static&amp;nbsp;&lt;/font&gt;&lt;font color="red"&gt;void&amp;nbsp;&lt;/font&gt;&lt;font color="midnightblue"&gt;Main&amp;nbsp;&lt;/font&gt;&lt;font color="darkgreen"&gt;(&lt;/font&gt;&lt;font color="red"&gt;string&lt;/font&gt;&lt;font color="darkgreen"&gt;[]&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;args&lt;/font&gt;&lt;font color="darkgreen"&gt;)&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkgreen"&gt;{&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkcyan"&gt;new&amp;nbsp;&lt;/font&gt;&lt;font color="midnightblue"&gt;GladeApp&amp;nbsp;&lt;/font&gt;&lt;font color="darkgreen"&gt;(&lt;/font&gt;&lt;font color="#000000"&gt;args&lt;/font&gt;&lt;font color="darkgreen"&gt;);&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkgreen"&gt;}&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="blue"&gt;public&amp;nbsp;&lt;/font&gt;&lt;font color="midnightblue"&gt;GladeApp&amp;nbsp;&lt;/font&gt;&lt;font color="darkgreen"&gt;(&lt;/font&gt;&lt;font color="red"&gt;string&lt;/font&gt;&lt;font color="darkgreen"&gt;[]&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;args&lt;/font&gt;&lt;font color="darkgreen"&gt;)&amp;nbsp;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkgreen"&gt;{&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;Application&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="midnightblue"&gt;Init&lt;/font&gt;&lt;font color="darkgreen"&gt;();&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;Glade&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="#000000"&gt;XML&amp;nbsp;gxml&amp;nbsp;&lt;/font&gt;&lt;font color="darkgreen"&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color="darkcyan"&gt;new&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;Glade&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="midnightblue"&gt;XML&lt;/font&gt;&lt;font color="darkgreen"&gt;(&lt;/font&gt;&lt;font color="black"&gt;null&lt;/font&gt;&lt;font color="darkgreen"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;"HelloGtkWorld.glade.xml"&lt;/font&gt;&lt;font color="darkgreen"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;"mainWindow"&lt;/font&gt;&lt;font color="darkgreen"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;null&lt;/font&gt;&lt;font color="darkgreen"&gt;);&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;gxml&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="midnightblue"&gt;Autoconnect&lt;/font&gt;&lt;font color="darkgreen"&gt;(&lt;/font&gt;&lt;font color="black"&gt;this&lt;/font&gt;&lt;font color="darkgreen"&gt;);&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;messageLabel&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="#000000"&gt;Text&amp;nbsp;&lt;/font&gt;&lt;font color="darkgreen"&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;"Hello,&amp;nbsp;Gtk#&amp;nbsp;World."&lt;/font&gt;&lt;font color="darkgreen"&gt;;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;Application&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="midnightblue"&gt;Run&lt;/font&gt;&lt;font color="darkgreen"&gt;();&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkgreen"&gt;}&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="red"&gt;void&amp;nbsp;&lt;/font&gt;&lt;font color="midnightblue"&gt;MainWindowDeleteEvent&lt;/font&gt;&lt;font color="darkgreen"&gt;(&lt;/font&gt;&lt;font color="red"&gt;object&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;o&lt;/font&gt;&lt;font color="darkgreen"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;DeleteEventArgs&amp;nbsp;args&lt;/font&gt;&lt;font color="darkgreen"&gt;)&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkgreen"&gt;{&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;Application&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="midnightblue"&gt;Quit&lt;/font&gt;&lt;font color="darkgreen"&gt;();&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;args&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="#000000"&gt;RetVal&amp;nbsp;&lt;/font&gt;&lt;font color="darkgreen"&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color="darkcyan"&gt;true&lt;/font&gt;&lt;font color="darkgreen"&gt;;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkgreen"&gt;}&lt;/font&gt;&lt;br /&gt;&lt;font color="darkgreen"&gt;}&lt;/font&gt; &lt;/font&gt;&lt;br /&gt;
&lt;p&gt;Let us have a look at this code before we attempt to make sure it compiles. The main part of interest is in the GladeApp class's constructor. First Gtk is initialised:&lt;/p&gt;&lt;font face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;Application&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="midnightblue"&gt;Init&lt;/font&gt;&lt;font color="darkgreen"&gt;();&lt;/font&gt; &lt;/font&gt;&lt;br /&gt;
&lt;p&gt;This must be called before any Gtk libraries are used.&lt;/p&gt;
&lt;p&gt;Then a Glade.XML object is created that will use our "glade.xml" file which has been embedded as a resource. Note that the resource name is the name of the file with the project's namespace prefixed "HelloGtkWorld.gui.xml".&lt;/p&gt;&lt;font face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;Glade&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="#000000"&gt;XML&amp;nbsp;gxml&amp;nbsp;&lt;/font&gt;&lt;font color="darkgreen"&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color="darkcyan"&gt;new&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;Glade&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="midnightblue"&gt;XML&lt;/font&gt;&lt;font color="darkgreen"&gt;(&lt;/font&gt;&lt;font color="black"&gt;null&lt;/font&gt;&lt;font color="darkgreen"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;"HelloGtkWorld.glade.xml"&lt;/font&gt;&lt;font color="darkgreen"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;"mainWindow"&lt;/font&gt;&lt;font color="darkgreen"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;null&lt;/font&gt;&lt;font color="darkgreen"&gt;);&lt;/font&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;
&lt;p&gt;The Autoconnect call connects the signals defined in the Glade xml file to matching handlers in the GladeApp class. It will also initialise any fields that correspond to UI components defined in the Glade xml file.&lt;/p&gt;&lt;font face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;gxml&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="midnightblue"&gt;Autoconnect&lt;/font&gt;&lt;font color="darkgreen"&gt;(&lt;/font&gt;&lt;font color="black"&gt;this&lt;/font&gt;&lt;font color="darkgreen"&gt;);&lt;/font&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;
&lt;p&gt;The next line sets the text of the label that will be displayed in the main window.&lt;/p&gt;&lt;font face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;messageLabel&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="#000000"&gt;Text&amp;nbsp;&lt;/font&gt;&lt;font color="darkgreen"&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;"Hello,&amp;nbsp;Gtk#&amp;nbsp;World."&lt;/font&gt;&lt;font color="darkgreen"&gt;;&lt;/font&gt; &lt;/font&gt;&lt;br /&gt;
&lt;p&gt;The messageLabel object&lt;/p&gt;&lt;font face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkgreen"&gt;[&lt;/font&gt;&lt;font color="#000000"&gt;Widget&lt;/font&gt;&lt;font color="darkgreen"&gt;]&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;Label&amp;nbsp;messageLabel&lt;/font&gt;&lt;font color="darkgreen"&gt;;&lt;/font&gt; &lt;/font&gt;&lt;br /&gt;
&lt;p&gt;will auto-magically be initialised for us by the Glade.Xml object.&lt;/p&gt;
&lt;p&gt;Finally the application is run via:&lt;/p&gt;&lt;font face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;Application&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="midnightblue"&gt;Run&lt;/font&gt;&lt;font color="darkgreen"&gt;();&lt;/font&gt; &lt;/font&gt;&lt;br /&gt;
&lt;p&gt;When the user closes the main window the MainWindowDeleteEvent method is called.&lt;/p&gt;&lt;font face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="red"&gt;void&amp;nbsp;&lt;/font&gt;&lt;font color="midnightblue"&gt;MainWindowDeleteEvent&lt;/font&gt;&lt;font color="darkgreen"&gt;(&lt;/font&gt;&lt;font color="red"&gt;object&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;o&lt;/font&gt;&lt;font color="darkgreen"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;DeleteEventArgs&amp;nbsp;args&lt;/font&gt;&lt;font color="darkgreen"&gt;)&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkgreen"&gt;{&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;Application&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="midnightblue"&gt;Quit&lt;/font&gt;&lt;font color="darkgreen"&gt;();&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;args&lt;/font&gt;&lt;font color="darkgreen"&gt;.&lt;/font&gt;&lt;font color="#000000"&gt;RetVal&amp;nbsp;&lt;/font&gt;&lt;font color="darkgreen"&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color="darkcyan"&gt;true&lt;/font&gt;&lt;font color="darkgreen"&gt;;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="darkgreen"&gt;}&lt;/font&gt; &lt;/font&gt;&lt;br /&gt;
&lt;p&gt;This method makes sure the application quits. If the Application.Quit method is not called then even though the main window has been closed the app will still be running in the background.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Add references to the Glade and Gtk assemblies.&lt;/b&gt; 
&lt;/p&gt;&lt;p&gt;
&lt;/p&gt;&lt;ol&gt;
&lt;li&gt;Open the Project Browser. Select the "References" node, right click and select "Add References". 
&lt;/li&gt;&lt;li&gt;In the "Add Reference" dialog select the ".NET Assembly Browser" tab and click the "Browse..." button. 
&lt;/li&gt;&lt;li&gt;Browse to the Mono folder containing the assemblies for Glade and Gtk#. The folder should be something like "C:\Program Files\Mono\lib\mono\gtk-sharp". Select the glade-sharp and gtk-sharp dlls and click the "Open" button. In the "Add Reference" dialog click the "OK" button.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;Compiling the code&lt;/b&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select the menu item Project | Project Options. In the "Application" tab, change the "Output type" to be "Windows Application". 
&lt;/li&gt;&lt;li&gt;In the "Compiling" tab, change the "Target framework" to "Mono 1.1". 
&lt;/li&gt;&lt;li&gt;In the "Debug" tab, change the "Start Action" to "Start external program". Set the external program field by browsing and selecting Mono.exe, which lives in "C:\Program Files\Mono\bin". In the "Start Options" group set the "Command line arguments to be "${TargetPath}" and the "Working directory" to "${TargetDir}". 
&lt;/li&gt;&lt;li&gt;Select the menu Build | Rebuild Solution. The code should build successfully. There will be two warnings, one about MainWindowDeleteEvent method never being called and another about the messageLabel variable never being assigned to, both of which can be safely ignored.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;It is optional whether you use the Mono as the Target framework, the Gtk# and Glade libraries should work under the .NET framework. You will have to add references to the Glib and Atk libraries to be able to compile using Csc.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Running the app&lt;/b&gt; 
&lt;/p&gt;&lt;p&gt;
&lt;/p&gt;&lt;ol&gt;
&lt;li&gt;Select the menu Debug | Run without debugger.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;img src="/photos/mattward/images/1427/original.aspx" /&gt; &lt;br /&gt;
&lt;p&gt;As with the target framework, it is optional whether you run the application under Mono since the Gtk# and Glade libraries should work under the .NET framework.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Other Useful Resources&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="Introduction to Mono - Your first Mono app" href="http://www.codeproject.com/cpnet/introtomono1.asp"&gt;Introduction to Mono - Your first Mono app&lt;/a&gt; - Covers creating a Mono console app.&lt;/p&gt;&lt;a title="A google search application using Gtk#" href="http://www.codeproject.com/cpnet/googleSearch.asp"&gt;A google search application using Gtk#&lt;/a&gt; - Uses Visual Studio to create a Gtk# Mono app that uses Google's web service. 
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="Gtk# Beginners Guide" href="http://www.mono-project.com/GtkSharpBeginnersGuide"&gt;A Gtk# beginners guide.&lt;/a&gt; - Covers Gtk# and Glade.&lt;/p&gt;
&lt;p&gt;&lt;a title="GUI Development with Glade" href="http://www.kplug.org/glade_tutorial/glade2_tutorial/glade2_introduction.html"&gt;GUI development with Glade&lt;/a&gt; - A tutorial covering the Glade User Interface Builder. &lt;/p&gt;
&lt;p&gt;&lt;a title="Mono Documentation" href="http://www.go-mono.com/docs/index.aspx"&gt;Mono Documentation&lt;/a&gt; - Covers all the Mono libraries including Gtk# and Glade.&lt;/p&gt;&lt;p&gt;&lt;b&gt;[Update: 10 Jan, 2006]&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SharpDevelop2 now ships with Gtk# and Glade# templates.&amp;nbsp; Support for Mono's GAC has also been added.&amp;nbsp; Read more &lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/01/10/SharpDevelop2AndMonosGac.aspx"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=1432" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/Mono/default.aspx">Mono</category></item><item><title>Detecting Where Mono is Installed</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/17/DetectingWhereMonoIsInstalled.aspx</link><pubDate>Mon, 17 Oct 2005 21:19:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:1365</guid><dc:creator>MattWard</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/rsscomments.aspx?PostID=1365</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/commentapi.aspx?PostID=1365</wfw:comment><comments>http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/17/DetectingWhereMonoIsInstalled.aspx#comments</comments><description>Whilst looking at the NAnt config file (Nant.exe.config), I noticed
that NAnt does a much better job at detecting where the Mono compilers,
Mcs and Gmcs, are located. NAnt reads the registry, whilst SharpDevelop
assumes that they exist somewhere in a folder, typically "C:\Program
Files\Mono\bin", that has been added to the Path environment variable.
If you add the "C:\Program Files\Mono\bin" folder to the Path then
everything should work. In this bin folder there are several .bat files
that can be used to run the various Mono compilers, and these are what
SharpDevelop uses. The Mono executables live in "C:\Program
Files\Mono\lib\mono\1.0" and "C:\Program Files\Mono\lib\mono\2.0",
depending on the framework being targeted, and the .bat files run these
executables under Mono.
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Mono's Registry Settings&lt;/b&gt;

&lt;br&gt;
&lt;br&gt;
When you install Mono under Windows the installer adds a registry key
under HKEY_LOCAL_MACHINE\SOFTWARE\Novell\Mono, and the values entered
here can be used to detect where Mono is.&lt;br&gt;
&lt;br&gt;
&lt;font color="#000000"&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Novell\Mono]&lt;br&gt;
DefaultCLR=1.1.9.2&lt;br&gt;
&lt;br&gt;
[HKEY_LOCAL_MACHINE\SOFTWARE\Novell\Mono\1.1.9.2]&lt;br&gt;
FrameworkAssemblyDirectory=C:\Program Files\Mono\lib&lt;br&gt;
MonoConfigDir=C:\Program Files\Mono\etc&lt;br&gt;
SdkInstallRoot=C:\Program Files\Mono

&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
SharpDevelop will now use the registry to locate the Mono bin folder,
and if this fails then it falls back on its original method of assuming
that the compiler lives in a folder added to the Path.&lt;br&gt;
&lt;br&gt;
This small improvement has been added to SharpDevelop 2.0 in revision 593.&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=1365" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/Mono/default.aspx">Mono</category></item><item><title>Custom MSBuild Tasks for Mono</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/15/CustomMSBuildTasksForMono.aspx</link><pubDate>Sat, 15 Oct 2005 14:15:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:1303</guid><dc:creator>MattWard</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/rsscomments.aspx?PostID=1303</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/commentapi.aspx?PostID=1303</wfw:comment><comments>http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/15/CustomMSBuildTasksForMono.aspx#comments</comments><description>SharpDevelop ships with two custom MSBuild tasks for Mono, one for Mcs
and the other for Gmcs, both of which live in the
ICSharpCode.Build.Tasks assembly.&amp;nbsp; With the recent Mono release,
1.1.9, the command line options and compiler error message formats are
the same for Mcs and Gmcs, earlier versions differed.&amp;nbsp; This means
that the Mcs and Gmcs classes do not do much apart from determine the
name of the compiler to use.&amp;nbsp; The MonoCompilerTask class does the
hard work of compiling the code and reporting error messages back.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Simple C# Console Project&lt;/b&gt;&lt;br&gt;
&lt;br&gt;
HelloMonoWorld.csproj:&lt;br&gt;
&lt;br&gt;
&lt;font face="Courier New" size="2"&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;Project&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;DefaultTargets&lt;/font&gt;&lt;font color="Blue"&gt;="Build"&amp;nbsp;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;xmlns&lt;/font&gt;&lt;font color="Blue"&gt;="http://schemas.microsoft.com/developer/msbuild/2003"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;OutputType&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;Exe&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/OutputType&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;AssemblyName&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;HelloMonoWorld&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/AssemblyName&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;WarningLevel&amp;gt;&lt;/font&gt;&lt;font color="DarkBlue"&gt;4&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/WarningLevel&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;OutputPath&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;bin&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/OutputPath&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;ItemGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Compile&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Include&lt;/font&gt;&lt;font color="Blue"&gt;="Main.cs"&amp;nbsp;&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Compile&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Include&lt;/font&gt;&lt;font color="Blue"&gt;="AssemblyInfo.cs"&amp;nbsp;&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/ItemGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Import&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Project&lt;/font&gt;&lt;font color="Blue"&gt;="$(MSBuildBinPath)\Microsoft.CSharp.targets"&amp;nbsp;&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color="DarkMagenta"&gt;&amp;lt;/Project&amp;gt;&lt;br&gt;
&lt;/font&gt;&lt;/font&gt; &lt;br&gt;
Main.cs:&lt;br&gt;
&lt;br&gt;
&lt;font face="Courier New" size="2"&gt;&lt;font color="Green"&gt;using&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;System&lt;/font&gt;&lt;font color="DarkGreen"&gt;;&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&lt;font color="Green"&gt;namespace&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;HelloMonoWorld&lt;/font&gt;&lt;br&gt;
&lt;font color="DarkGreen"&gt;{&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;class&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;MainClass&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkGreen"&gt;{&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Blue"&gt;public&amp;nbsp;&lt;/font&gt;&lt;font color="Brown"&gt;static&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;void&amp;nbsp;&lt;/font&gt;&lt;font color="MidnightBlue"&gt;Main&lt;/font&gt;&lt;font color="DarkGreen"&gt;(&lt;/font&gt;&lt;font color="Red"&gt;string&lt;/font&gt;&lt;font color="DarkGreen"&gt;[]&amp;nbsp;&lt;/font&gt;&lt;font color="#000000"&gt;args&lt;/font&gt;&lt;font color="DarkGreen"&gt;)&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkGreen"&gt;{&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#000000"&gt;Console&lt;/font&gt;&lt;font color="DarkGreen"&gt;.&lt;/font&gt;&lt;font color="MidnightBlue"&gt;WriteLine&lt;/font&gt;&lt;font color="DarkGreen"&gt;(&lt;/font&gt;&lt;font color="Blue"&gt;"Hello&amp;nbsp;World!"&lt;/font&gt;&lt;font color="DarkGreen"&gt;);&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkGreen"&gt;}&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkGreen"&gt;}&lt;/font&gt;&lt;br&gt;
&lt;font color="DarkGreen"&gt;}&lt;/font&gt;&lt;br&gt;
&lt;/font&gt;&lt;br&gt;
Running MSBuild, passing the .csproj as a command line argument, will
build the console app using Microsoft's Csc and targets the .NET
Framework 2.0.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Using the Mcs Task Directly&lt;/b&gt;&lt;br&gt;
&lt;br&gt;
Let us modify the project file so it calls the Mcs task directly.&amp;nbsp;
I am assuming that the ICSharpCode.Build.Tasks.dll exists in the same
folder as the project file.&lt;br&gt;
&lt;br&gt;
&lt;font face="Courier New" size="2"&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;Project&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;DefaultTargets&lt;/font&gt;&lt;font color="Blue"&gt;="Build"&amp;nbsp;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;xmlns&lt;/font&gt;&lt;font color="Blue"&gt;="http://schemas.microsoft.com/developer/msbuild/2003"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;OutputType&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;Exe&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/OutputType&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;AssemblyName&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;HelloMonoWorld&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/AssemblyName&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;WarningLevel&amp;gt;&lt;/font&gt;&lt;font color="DarkBlue"&gt;4&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/WarningLevel&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;OutputPath&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;bin&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/OutputPath&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;ItemGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Compile&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Include&lt;/font&gt;&lt;font color="Blue"&gt;="Main.cs"&amp;nbsp;&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Compile&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Include&lt;/font&gt;&lt;font color="Blue"&gt;="AssemblyInfo.cs"&amp;nbsp;&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/ItemGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;UsingTask&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskName&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.Mcs"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;AssemblyFile&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.dll"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Target&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Name&lt;/font&gt;&lt;font color="Blue"&gt;="Build"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Mcs&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;OutputAssembly&lt;/font&gt;&lt;font color="Blue"&gt;="$(OutputPath)\$(AssemblyName).exe"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;References&lt;/font&gt;&lt;font color="Blue"&gt;="@(ReferencePath)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Sources&lt;/font&gt;&lt;font color="Blue"&gt;="@(Compile)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;TargetType&lt;/font&gt;&lt;font color="Blue"&gt;="$(OutputType)"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/Target&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color="DarkMagenta"&gt;&amp;lt;/Project&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;/font&gt;&lt;br&gt;
The project file above is a bit limited, it does not have standard
targets such as "Rebuild" and "Clean".&amp;nbsp; We could write everything
ourselves, but instead why not use the standard .targets that Microsoft
provides and just override the bare minimum?&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Mono.Mcs.targets&lt;/b&gt;&lt;br&gt;
&lt;br&gt;
So what is the bare minimum .targets file we need in order to get MSBuild to use our custom Mono tasks?&lt;br&gt;
&lt;br&gt;
First let us look at the modified project file:&lt;br&gt;
&lt;br&gt;&lt;font face="Courier New" size="2"&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;Project&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;DefaultTargets&lt;/font&gt;&lt;font color="Blue"&gt;="Build"&amp;nbsp;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;xmlns&lt;/font&gt;&lt;font color="Blue"&gt;="http://schemas.microsoft.com/developer/msbuild/2003"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;OutputType&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;Exe&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/OutputType&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;AssemblyName&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;HelloMonoWorld&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/AssemblyName&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;WarningLevel&amp;gt;&lt;/font&gt;&lt;font color="DarkBlue"&gt;4&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/WarningLevel&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;OutputPath&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;bin&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/OutputPath&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;ItemGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Compile&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Include&lt;/font&gt;&lt;font color="Blue"&gt;="Main.cs"&amp;nbsp;&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Compile&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Include&lt;/font&gt;&lt;font color="Blue"&gt;="AssemblyInfo.cs"&amp;nbsp;&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/ItemGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Import&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Project&lt;/font&gt;&lt;font color="Blue"&gt;="Mono.Mcs.targets"&amp;nbsp;&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color="DarkMagenta"&gt;&amp;lt;/Project&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;/font&gt;&lt;br&gt;
The Mono.Mcs.targets file, which is based on the Microsoft.CSharp.targets file, overrides the CoreCompile target:&lt;br&gt;
&lt;br&gt;&lt;font face="Courier New" size="2"&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;Project&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;DefaultTargets&lt;/font&gt;&lt;font color="Blue"&gt;="Build"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;xmlns&lt;/font&gt;&lt;font color="Blue"&gt;="http://schemas.microsoft.com/developer/msbuild/2003"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;UsingTask&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;TaskName&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.Mcs"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;AssemblyFile&lt;/font&gt;&lt;font color="Blue"&gt;="ICSharpCode.Build.Tasks.dll"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;MSBuildAllProjects&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;$(MSBuildAllProjects);Mono.Mcs.targets&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/MSBuildAllProjects&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;DefaultLanguageSourceExtension&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;.cs&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/DefaultLanguageSourceExtension&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Language&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;C#&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/Language&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Target&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Name&lt;/font&gt;&lt;font color="Blue"&gt;="CreateManifestResourceNames"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;DebugSymbols&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Condition&lt;/font&gt;&lt;font color="Blue"&gt;="&amp;nbsp;'$(DebugType)'&amp;nbsp;==&amp;nbsp;'none'&amp;nbsp;"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;false&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/DebugSymbols&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;DebugType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Condition&lt;/font&gt;&lt;font color="Blue"&gt;="&amp;nbsp;'$(DebugType)'&amp;nbsp;==&amp;nbsp;'none'&amp;nbsp;"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&amp;lt;/DebugType&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;ItemGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;DocFileItem&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Include&lt;/font&gt;&lt;font color="Blue"&gt;="$(DocumentationFile)"&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Condition&lt;/font&gt;&lt;font color="Blue"&gt;="'$(DocumentationFile)'!=''"&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;InProject&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;false&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/InProject&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/DocFileItem&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/ItemGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;CoreCompileDependsOn&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;_ComputeNonExistentFileProperty&lt;/font&gt;&lt;font color="DarkMagenta"&gt;&amp;lt;/CoreCompileDependsOn&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Target&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Name&lt;/font&gt;&lt;font color="Blue"&gt;="CoreCompile"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Inputs&lt;/font&gt;&lt;font color="Blue"&gt;="$(MSBuildAllProjects);&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;@(Compile);&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;@(ManifestResourceWithNoCulture);&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;$(ApplicationIcon);&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;$(AssemblyOriginatorKeyFile);&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;@(ManifestNonResxWithNoCultureOnDisk);&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;@(ReferencePath);&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;@(CompiledLicenseFile)&lt;/font&gt;&lt;font color="Blue"&gt;"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Outputs&lt;/font&gt;&lt;font color="Blue"&gt;="@(DocFileItem);&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;@(IntermediateAssembly);&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;$(NonExistentFile)&lt;/font&gt;&lt;font color="Blue"&gt;"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;DependsOnTargets&lt;/font&gt;&lt;font color="Blue"&gt;="$(CoreCompileDependsOn)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Mcs&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;AdditionalLibPaths&lt;/font&gt;&lt;font color="Blue"&gt;="$(AdditionalLibPaths)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;AddModules&lt;/font&gt;&lt;font color="Blue"&gt;="@(AddModules)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;AllowUnsafeBlocks&lt;/font&gt;&lt;font color="Blue"&gt;="$(AllowUnsafeBlocks)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;CheckForOverflowUnderflow&lt;/font&gt;&lt;font color="Blue"&gt;="$(CheckForOverflowUnderflow)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;CodePage&lt;/font&gt;&lt;font color="Blue"&gt;="$(CodePage)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;DebugType&lt;/font&gt;&lt;font color="Blue"&gt;="$(DebugType)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;DefineConstants&lt;/font&gt;&lt;font color="Blue"&gt;="$(DefineConstants)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;DelaySign&lt;/font&gt;&lt;font color="Blue"&gt;="$(DelaySign)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;DisabledWarnings&lt;/font&gt;&lt;font color="Blue"&gt;="$(NoWarn)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;DocumentationFile&lt;/font&gt;&lt;font color="Blue"&gt;="@(DocFileItem)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;EmitDebugInformation&lt;/font&gt;&lt;font color="Blue"&gt;="$(DebugSymbols)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;KeyContainer&lt;/font&gt;&lt;font color="Blue"&gt;="$(KeyContainerName)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;KeyFile&lt;/font&gt;&lt;font color="Blue"&gt;="$(KeyOriginatorFile)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;LangVersion&lt;/font&gt;&lt;font color="Blue"&gt;="$(LangVersion)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;MainEntryPoint&lt;/font&gt;&lt;font color="Blue"&gt;="$(StartupObject)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;NoConfig&lt;/font&gt;&lt;font color="Blue"&gt;="true"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;NoLogo&lt;/font&gt;&lt;font color="Blue"&gt;="$(NoLogo)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;NoStandardLib&lt;/font&gt;&lt;font color="Blue"&gt;="$(NoStdLib)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Optimize&lt;/font&gt;&lt;font color="Blue"&gt;="$(Optimize)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;OutputAssembly&lt;/font&gt;&lt;font color="Blue"&gt;="@(IntermediateAssembly)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;References&lt;/font&gt;&lt;font color="Blue"&gt;="@(ReferencePath)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Resources&lt;/font&gt;&lt;font color="Blue"&gt;="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;ResponseFiles&lt;/font&gt;&lt;font color="Blue"&gt;="$(CompilerResponseFile)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Sources&lt;/font&gt;&lt;font color="Blue"&gt;="@(Compile)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;TargetType&lt;/font&gt;&lt;font color="Blue"&gt;="$(OutputType)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;ToolPath&lt;/font&gt;&lt;font color="Blue"&gt;="$(McsToolPath)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;TreatWarningsAsErrors&lt;/font&gt;&lt;font color="Blue"&gt;="$(TreatWarningsAsErrors)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;WarningLevel&lt;/font&gt;&lt;font color="Blue"&gt;="$(WarningLevel)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Win32Icon&lt;/font&gt;&lt;font color="Blue"&gt;="$(ApplicationIcon)"&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Red"&gt;Win32Resource&lt;/font&gt;&lt;font color="Blue"&gt;="$(Win32Resource)"&amp;nbsp;&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;/Target&amp;gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="DarkMagenta"&gt;&amp;lt;Import&amp;nbsp;&lt;/font&gt;&lt;font color="Red"&gt;Project&lt;/font&gt;&lt;font color="Blue"&gt;="$(MSBuildBinPath)\Microsoft.Common.targets"&amp;nbsp;&lt;/font&gt;&lt;font color="DarkMagenta"&gt;/&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color="DarkMagenta"&gt;&amp;lt;/Project&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;/font&gt;&lt;br&gt;The differences between this is and the standard
Microsoft.CSharp.targets file is that a few properties have been
removed (NoWarn and UseHostCompilerIfAvailable) and the
CreateManifestResourceNames target has essentially been removed, the
target is defined, but it does nothing.&amp;nbsp; This targets file is good
enough to compile our console application, as long as we do not add any
embedded resources to it.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;SharpDevelop&lt;br&gt;
&lt;br&gt;
&lt;/b&gt;How does this compare with the .targets files that ship with
SharpDevelop?&amp;nbsp; Since SharpDevelop can target more than just Mono,
it supports the older .NET frameworks too, things are a little more
complicated.&amp;nbsp; This will be covered in another post.&lt;br&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=1303" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/Mono/default.aspx">Mono</category><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/MSBuild/default.aspx">MSBuild</category></item><item><title>SharpDevelop 2.0 and Mono</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/12/SharpDevelopAndMono.aspx</link><pubDate>Wed, 12 Oct 2005 22:16:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:1250</guid><dc:creator>MattWard</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/rsscomments.aspx?PostID=1250</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.sharpdevelop.net/blogs/mattward/commentapi.aspx?PostID=1250</wfw:comment><comments>http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/12/SharpDevelopAndMono.aspx#comments</comments><description>&lt;p&gt;As of revision 568, available from the &lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.UsingTheRepository"&gt;repository&lt;/a&gt;, SharpDevelop 2.0 supports C# projects targeting &lt;a href="http://www.mono-project.com/"&gt;Mono 1.1.9.2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Mono 1.1.9.2 is installed. 
&lt;/li&gt;&lt;li&gt;The Mono bin folder has been added to the "Path" environment variable (Control Panel | System | Advanced | Environment Variables).&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Targeting Mono&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To target Mono, open the project's "Compiling" options (Project | Project Options | Compiling) and select either "Mono 1.1" or "Mono 2.0" from the "Target Framework" drop down list.&lt;/p&gt;
&lt;p&gt;&lt;img src="/photos/mattward/images/1248/original.aspx"&gt;&lt;/p&gt;
&lt;p&gt;With "Mono 1.1" selected the Mcs compiler will be used.&amp;nbsp; With "Mono 2.0" selected the Gmcs compiler will be used.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Running your Application&lt;/b&gt;&lt;/p&gt;&lt;p&gt;After you have compiled your code using Mcs or Gmcs you can then run your application under Microsoft's .NET Framework or under Mono's Framework. If
you want to run it under Microsoft's .NET Framework then you can use either of the menu options "Debug | Run" or "Debug | Run without debugger" as you would with a normal application created using SharpDevelop. You will need to make sure all the Mono specific assembly references (e.g. glib-sharp) have "Local Copy" set to "true", otherwise the Microsoft .NET Framework will be unable to find them. If you want to run your application under Mono's Framework instead follow the instructions in the next section.&lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Running under Mono&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To configure your application to run under Mono's Framework, open the project's "Debug" options (Project | Project Options | Debug), switch the "Start Action" to "Start external program" and enter the path to the Mono executable, and finally set the "Command line arguments" to "${TargetPath}". If the path to your application's executable contains spaces put double quotes around the ${TargetPath} string. &lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/photos/mattward/images/1249/original.aspx"&gt;&lt;/p&gt;
&lt;p&gt;To run your application under Mono, select the menu option Debug | Run without debugger.&amp;nbsp; You cannot use the SharpDevelop debugger to debug or run your Mono application.&lt;/p&gt;&lt;b&gt;Common Problems&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Mcs/Gmcs exiting with code -1&lt;/b&gt;&lt;br&gt;&lt;br&gt;If you are seeing errors such as:&lt;br&gt;&lt;br&gt;"Mcs.exe" exited with code -1&lt;br&gt;Failed to execute compiler: -1: "C:\Program Files\Mono\bin\Mcs.bat"&lt;br&gt;&lt;br&gt;This is usually because Mono cannot convert the command line into Unicode.&amp;nbsp; To fix this create a environment variable called MONO_EXTERNAL_ENCODINGS and set it to be "default_locale" without the quotes.&lt;br&gt;&lt;br&gt;From the Mono man page:&lt;br&gt;&lt;br&gt;&lt;font color="#000080" face="Verdana" size="1"&gt;MONO_EXTERNAL_ENCODINGS&lt;br&gt;&lt;br&gt;If set, contains a colon-separated list of text encodings to try when turning externally-generated text (e.g. command-line arguments or filenames) into Unicode. The encoding names come from the list provided by iconv, and the special case "default_locale" which refers to the current locale's default encoding.&lt;br&gt;&lt;br&gt;When reading externally-generated text strings UTF-8 is tried first, and then this list is tried in order with the first successful conversion ending the&amp;nbsp; search. When writing external text (e.g. new filenames or arguments to new processes) the first item in this list is used, or UTF-8 if the environment variable is not set.&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;[UPDATE 6th March, 2006]&lt;/b&gt;&lt;br&gt;&lt;br&gt;Added MONO_EXTERNAL_ENCODINGS fix for the Mcs/Gmcs compiler failing with error code -1.&amp;nbsp; Thanks to &lt;a href="http://www.koios.co.nr/"&gt;Luis Segura&lt;/a&gt; for finding this solution.&lt;br&gt;&lt;br&gt;&lt;b&gt;[UPDATE 10th April, 2006]&lt;br&gt;&lt;br&gt;&lt;/b&gt;Added some information about running under Microsoft's .NET Framework versus running under Mono. Added a note about putting double quotes around ${TargetPath} if the path to the executable being run under Mono contains spaces.&lt;br&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=1250" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/Mono/default.aspx">Mono</category></item></channel></rss>