<?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>SharpDevelop Community</title><link>http://community.sharpdevelop.net/blogs/</link><description>Get your problems solved!</description><dc:language>en-US</dc:language><generator>CommunityServer 2007.1 SP2 (Build: 31113.47)</generator><item><title>Using MSTest with SharpDevelop</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2012/05/06/UsingMSTestWithSharpDevelop.aspx</link><pubDate>Sun, 06 May 2012 17:32:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:40240</guid><dc:creator>MattWard</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;SharpDevelop 4.2 now has a new 
    &lt;a href="http://wiki.sharpdevelop.net/InsideSharpDevelop.Samples-MSTestAddin.ashx"&gt;sample addin&lt;/a&gt; that adds integrated support for running tests 
    with 
    &lt;a href="http://http//msdn.microsoft.com/en-us/library/ms182489%28v=vs.100%29.aspx"&gt;MSTest&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;p&gt;Given the following code:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/MSTestAddinTestClassSourceCode.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;In the &lt;b&gt;Unit Tests&lt;/b&gt; window the MS Tests will be displayed. 
    The unit tests can be run by right clicking and selecting &lt;b&gt;Run 
    tests&lt;/b&gt;. The &lt;b&gt;Unit Tests&lt;/b&gt; window will update to show the 
    tests that passed and failed.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/MSTestAddinUnitTestsWindowAfterTestRun.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The output from the MS test runner (mstest.exe) will be 
    displayed in the &lt;b&gt;Output&lt;/b&gt; window.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/MSTestAddinOutputWindow.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Any test failures are displayed in the &lt;b&gt;Errors&lt;/b&gt; window.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/MSTestAddinErrorsWindow.aspx" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;There is a default path defined for mstest.exe which points to 
    the Visual Studio 2010 folder but you can alter this path from the 
    Tools Options dialog under Tools - MS Test.&lt;/p&gt;
&lt;p&gt;Note that running tests with the debugger or with code coverage 
    does not work.&lt;/p&gt;
&lt;p&gt;Full details on how the addin works can be found in the 
    &lt;a href="http://wiki.sharpdevelop.net/InsideSharpDevelop.Samples-MSTestAddin.ashx"&gt;wiki&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Using the MSTest addin&lt;/h2&gt;
&lt;p&gt;To use the MSTest addin either follow the instructions in the 
    wiki to build it from source or download the 
    &lt;a href="http://community.sharpdevelop.net/blogs/mattward/MSTest/MSTest.zip"&gt;pre-built addin&lt;/a&gt; and register it with SharpDevelop using the 
    Addin Manager by selecting AddIn Manager from the Tools menu.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=40240" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/MSTest/default.aspx">MSTest</category></item><item><title>Async Targeting Pack in SharpDevelop 4.2 (and later)</title><link>http://community.sharpdevelop.net/blogs/christophwille/archive/2012/05/04/async-targeting-pack-in-sharpdevelop-4-2-and-later.aspx</link><pubDate>Fri, 04 May 2012 09:32:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:40221</guid><dc:creator>ChristophWille</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Microsoft has released the &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=29576"&gt;Async Targeting Pack for Visual Studio 11&lt;/a&gt;, which is also available as a NuGet package - and thus available in SharpDevelop. What does this Targeting Pack do? It allows you to use the async / await constructs in your pre-.NET 4.5 application.&lt;/p&gt;
&lt;p&gt;Take the following application project:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/blogs/christophwille/asyncawait_fw40_1.png"&gt;&lt;img src="http://community.sharpdevelop.net/blogs/christophwille/asyncawait_fw40_1.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It comes up with a couple of errors that wouldn&amp;#39;t show if I had been targeting .NET 4.5. So how to fix this? NuGet to the rescue:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/blogs/christophwille/asyncawait_fw40_2.png"&gt;&lt;img src="http://community.sharpdevelop.net/blogs/christophwille/asyncawait_fw40_2.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Search for the &lt;b&gt;Microsoft.CompilerServices.AsyncTargetingPack&lt;/b&gt; from the Manage Packages dialog (don&amp;#39;t forget to click Add!):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/blogs/christophwille/asyncawait_fw40_3.png"&gt;&lt;img src="http://community.sharpdevelop.net/blogs/christophwille/asyncawait_fw40_3.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now your project will build and run nicely - note the new assembly reference (Microsoft.CompilerServices.AsyncTargetingPack.Net4) and NuGet configuration (packages.config):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/blogs/christophwille/asyncawait_fw40_4.png"&gt;&lt;img src="http://community.sharpdevelop.net/blogs/christophwille/asyncawait_fw40_4.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;One important caveat though: You must have .NET 4.5 installed on your development machine and set the project to build using the C# 5.0 compiler!&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=40221" width="1" height="1"&gt;</description></item><item><title>Adding a Service Reference</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2012/04/22/AddServiceReference.aspx</link><pubDate>Sun, 22 Apr 2012 10:28:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:40117</guid><dc:creator>MattWard</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;SharpDevelop 4.2 now includes support for adding references to 
    WCF services.&lt;/p&gt;
&lt;h2&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=8279"&gt;Microsoft 
    Windows SDK&lt;/a&gt; should be installed.&lt;/p&gt;
&lt;p&gt;In order to generate the service reference SharpDevelop uses 
    Microsoft&amp;#39;s ServiceModel Metadata Utility Tool 
    &lt;a href="http://msdn.microsoft.com/en-us/library/aa347733.aspx"&gt;
    SvcUtil&lt;/a&gt; which is included as part of the 
    &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=8279"&gt;
    Microsoft Windows SDK&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Configuring SvcUtil Location&lt;/h2&gt;
&lt;p&gt;SharpDevelop should automatically detect where SvcUtil is 
    installed however the path to SvcUtil can be overridden if required 
    from the Tools - Options dialog. &lt;/p&gt;
&lt;p&gt;&lt;img alt="SvcUtil path configuration in Tools Options" src="http://community.sharpdevelop.net/photos/mattward/images/original/ToolsOptionsSvcUtilPathConfig.aspx" /&gt;&lt;/p&gt;
&lt;h2&gt;Adding a Service Reference&lt;/h2&gt;
&lt;p&gt;To add a service reference, open the Projects window, right 
    click on the project or the references and select Add Service 
    Reference.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Add service reference context menu" src="http://community.sharpdevelop.net/photos/mattward/images/original/AddServiceReferenceContextMenu.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;In the Add Service Reference dialog enter the url to the WCF 
    service and click Go. The WCF service that is discovered should 
    then be displayed.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Add service reference dialog" src="http://community.sharpdevelop.net/photos/mattward/images/original/AddServiceReferenceDialog.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;Clicking the Advanced button will allow you to configure further 
    generation options.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Advanced service reference options" src="http://community.sharpdevelop.net/photos/mattward/images/original/AdvancedServiceReferenceOptionsDialog.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;In the main Add Service Reference dialog enter a namespace for 
    the service and then click the OK button to generate the service 
    reference.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Generated service reference in projects window." src="http://community.sharpdevelop.net/photos/mattward/images/original/GeneratedServiceReferenceInProjectsWindow.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;A service reference proxy will be added to the project and the 
    project&amp;#39;s app.config file will be updated with the WCF binding 
    information.&lt;/p&gt;
&lt;p&gt;Now you can use the WCF service in your application.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=40117" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/WCF/default.aspx">WCF</category></item><item><title>Decompiling Async/Await</title><link>http://community.sharpdevelop.net/blogs/danielgrunwald/archive/2012/04/16/decompiling-async-await.aspx</link><pubDate>Mon, 16 Apr 2012 12:23:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:40075</guid><dc:creator>DanielGrunwald</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Just after the &lt;a href="http://community.sharpdevelop.net/blogs/christophwille/archive/2012/04/15/ilspy-2-0-final.aspx"&gt;ILSpy 2.0 release&lt;/a&gt;, I started adding support for decompiling C# 5 async/await to ILSpy.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/blogs/danielgrunwald/AsyncAwait.png"&gt;&lt;img src="http://community.sharpdevelop.net/blogs/danielgrunwald/AsyncAwait.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can get the async-enabled ILSpy build from our &lt;a href="http://build.sharpdevelop.net/BuildArtefacts/#ILSpyMaster"&gt;build server&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The async support is not yet complete; for example decompilation fails if the IL evaluation stack is not empty at the point of the await expression.&lt;/p&gt;
&lt;p&gt;The decompilation logic highly depends on the patterns produced by the C# 5 compiler - it only works with code compiled with the C# compiler in the .NET 4.5 beta release, not with any previous CTPs. Also, it is likely that ILSpy will need adjustments for the final C# 5 compiler.&lt;/p&gt;
&lt;p&gt;While testing, I found that the .NET 4.5 beta BCL was &lt;b&gt;not&lt;/b&gt; compiled with the beta compiler - where the beta compiler uses multiple awaiter fields, the BCL code uses a single field of type object and uses arrays of length 1. This is similar to the code generated by the .NET 4.5 developer preview, so my guess is that Microsoft used some internal version in between the developer preview and the beta for compiling the .NET 4.5 beta BCL. For more information, take a look at Jon Skeet&amp;#39;s &lt;a href="http://msmvps.com/blogs/jon_skeet/archive/2012/03/06/eduasync-20-changes-between-the-vs11-preview-and-the-visual-studio-11-beta.aspx"&gt;description of the async codegen changes&lt;/a&gt;.&lt;br /&gt;This means the ILSpy cannot decompile async methods in the .NET 4.5 beta BCL. This problem should disappear with the next .NET 4.5 release (.NET 4.5 RC?).&lt;/p&gt;
&lt;p&gt;So how does ILSpy decompile async methods, then? Consider the compiler-generated code of the move next method:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#008000;"&gt;// Async.$AwaitInLoopCondition$d__17&lt;/span&gt;&lt;br /&gt;
&lt;span style="color:#ff0000;"&gt;void&lt;/span&gt;&amp;nbsp;IAsyncStateMachine.&lt;span style="color:#191970;font-weight:bold;"&gt;MoveNext&lt;/span&gt;()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008080;font-weight:bold;"&gt;try&lt;/span&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;span style="color:#ff0000;font-weight:bold;"&gt;int&lt;/span&gt;&amp;nbsp;num =&amp;nbsp;&lt;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$&lt;span style="color:#00008b;"&gt;1&lt;/span&gt;__state;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TaskAwaiter&amp;lt;&lt;span style="color:#ff0000;font-weight:bold;"&gt;bool&lt;/span&gt;&amp;gt;&amp;nbsp;taskAwaiter;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;font-weight:bold;"&gt;if&lt;/span&gt;&amp;nbsp;(num ==&amp;nbsp;&lt;span style="color:#00008b;"&gt;0&lt;/span&gt;)&lt;br /&gt;
&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;taskAwaiter =&amp;nbsp;&lt;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$u__$awaiter18;&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;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$u__$awaiter18 =&amp;nbsp;&lt;span style="color:#0000ff;font-weight:bold;"&gt;default&lt;/span&gt;(TaskAwaiter&amp;lt;&lt;span style="color:#ff0000;font-weight:bold;"&gt;bool&lt;/span&gt;&amp;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;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$&lt;span style="color:#00008b;"&gt;1&lt;/span&gt;__state =&amp;nbsp;-&lt;span style="color:#00008b;"&gt;1&lt;/span&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;span style="color:#000080;"&gt;goto&lt;/span&gt;&amp;nbsp;IL_7C;&lt;br /&gt;
&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;IL_23:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;taskAwaiter =&amp;nbsp;&lt;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$&lt;span style="color:#00008b;"&gt;4&lt;/span&gt;__this.&lt;span style="color:#191970;font-weight:bold;"&gt;SimpleBoolTaskMethod&lt;/span&gt;().&lt;span style="color:#191970;font-weight:bold;"&gt;GetAwaiter&lt;/span&gt;();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;font-weight:bold;"&gt;if&lt;/span&gt;&amp;nbsp;(!taskAwaiter.IsCompleted)&lt;br /&gt;
&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;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$&lt;span style="color:#00008b;"&gt;1&lt;/span&gt;__state =&amp;nbsp;&lt;span style="color:#00008b;"&gt;0&lt;/span&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;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$u__$awaiter18 = taskAwaiter;&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;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$t__builder.AwaitUnsafeOnCompleted&amp;lt;TaskAwaiter&amp;lt;&lt;span style="color:#ff0000;font-weight:bold;"&gt;bool&lt;/span&gt;&amp;gt;,&amp;nbsp;Async.$AwaitInLoopCondition$d__17&amp;gt;(&lt;span style="color:#ff1493;font-weight:bold;"&gt;ref&lt;/span&gt;&amp;nbsp;taskAwaiter,&amp;nbsp;&lt;span style="color:#ff1493;font-weight:bold;"&gt;ref&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;this&lt;/span&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;span style="color:#000080;"&gt;return&lt;/span&gt;;&lt;br /&gt;
&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;IL_7C:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ff0000;font-weight:bold;"&gt;bool&lt;/span&gt;&amp;nbsp;arg_8B_0 = taskAwaiter.&lt;span style="color:#191970;font-weight:bold;"&gt;GetResult&lt;/span&gt;();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;taskAwaiter =&amp;nbsp;&lt;span style="color:#0000ff;font-weight:bold;"&gt;default&lt;/span&gt;(TaskAwaiter&amp;lt;&lt;span style="color:#ff0000;font-weight:bold;"&gt;bool&lt;/span&gt;&amp;gt;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;font-weight:bold;"&gt;if&lt;/span&gt;&amp;nbsp;(arg_8B_0)&lt;br /&gt;
&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;Console.&lt;span style="color:#191970;font-weight:bold;"&gt;WriteLine&lt;/span&gt;(&lt;span style="color:#0000ff;"&gt;&amp;quot;Body&amp;quot;&lt;/span&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;span style="color:#000080;"&gt;goto&lt;/span&gt;&amp;nbsp;IL_23;&lt;br /&gt;
&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;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008080;font-weight:bold;"&gt;catch&lt;/span&gt;&amp;nbsp;(Exception exception)&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;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$&lt;span style="color:#00008b;"&gt;1&lt;/span&gt;__state =&amp;nbsp;-&lt;span style="color:#00008b;"&gt;2&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$t__builder.&lt;span style="color:#191970;font-weight:bold;"&gt;SetException&lt;/span&gt;(exception);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000080;"&gt;return&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$&lt;span style="color:#00008b;"&gt;1&lt;/span&gt;__state =&amp;nbsp;-&lt;span style="color:#00008b;"&gt;2&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$t__builder.&lt;span style="color:#191970;font-weight:bold;"&gt;SetResult&lt;/span&gt;();&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;The state machine works similar to the one used by yield return; so we could reuse a lot of the code from the &lt;a href="http://community.sharpdevelop.net/blogs/danielgrunwald/archive/2011/03/06/ilspy-yield-return.aspx"&gt;yield return decompiler&lt;/a&gt;.&lt;br /&gt;Each &lt;span style="color:#008080;font-weight:bold;"&gt;try&lt;/span&gt; block begins with a state dispatcher: depending on the value of &lt;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$&lt;span style="color:#00008b;"&gt;1&lt;/span&gt;__state, the code jumps to the appropriate location. If the async method involves exception handling, there will be a separate state dispatcher at the beginning of each &lt;span style="color:#008080;font-weight:bold;"&gt;try&lt;/span&gt; block.&lt;br /&gt;In this case, there are only two states: the initial state (state = -1) and the state at the await expression (state = 0). The state dispatcher consists only of the two statements &amp;quot;&lt;span style="color:#ff0000;font-weight:bold;"&gt;int&lt;/span&gt;&amp;nbsp;num =&amp;nbsp;&lt;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$&lt;span style="color:#00008b;"&gt;1&lt;/span&gt;__state; &lt;span style="color:#0000ff;font-weight:bold;"&gt;if&lt;/span&gt;&amp;nbsp;(num ==&amp;nbsp;&lt;span style="color:#00008b;"&gt;0&lt;/span&gt;)&amp;quot;. We rely on the fact that in the actual IL code, the state dispatcher is a contiguous sequence of IL instructions, in front of any of the method&amp;#39;s actual code. &lt;/p&gt;
&lt;p&gt;Note that the async/await decompiler step runs on the ILAst very early in the &lt;a href="http://community.sharpdevelop.net/blogs/danielgrunwald/archive/2011/04/26/ilspy-decompiler-architecture-overview.aspx"&gt;decompiler pipeline&lt;/a&gt;, immediately after the yield return transform, which is prior to any control flow analysis. We&amp;#39;re basically still dealing with IL instructions here; but I&amp;#39;m explaining it in terms of C# as that is easier to read (and makes the code much shorter).&lt;/p&gt;
&lt;p&gt;The analysis of the state dispatcher works using symbolic execution; it is described in more detail in the &lt;a href="http://community.sharpdevelop.net/controlpanel/blogs/danielgrunwald/archive/2011/03/06/ilspy-yield-return.aspx"&gt;yield return decompiler&lt;/a&gt; explanation. In our example, the result of the analysis is that the beginning of the first if statement is reached for state==0, and label IL_23 is reached for all other states.&lt;/p&gt;
&lt;p&gt;With this information, we start cleaning up the control flow of the method. We look for any &amp;#39;&lt;span style="color:#000080;"&gt;return&lt;/span&gt;;&amp;#39; statements and analyze the instructions directly in front:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$&lt;span style="color:#00008b;"&gt;1&lt;/span&gt;__state =&amp;nbsp;&lt;span style="color:#00008b;"&gt;0&lt;/span&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;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$u__$awaiter18 = taskAwaiter;&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;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$t__builder.AwaitUnsafeOnCompleted&amp;lt;TaskAwaiter&amp;lt;&lt;span style="color:#ff0000;font-weight:bold;"&gt;bool&lt;/span&gt;&amp;gt;,&amp;nbsp;Async.$AwaitInLoopCondition$d__17&amp;gt;(&lt;span style="color:#ff1493;font-weight:bold;"&gt;ref&lt;/span&gt;&amp;nbsp;taskAwaiter,&amp;nbsp;&lt;span style="color:#ff1493;font-weight:bold;"&gt;ref&lt;/span&gt;&amp;nbsp;&lt;span style="font-weight:bold;"&gt;this&lt;/span&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;span style="color:#000080;"&gt;return&lt;/span&gt;;&lt;/p&gt;
&lt;p&gt;We then replace this piece code with an instruction that represents the AwaitUnsafeOnCompleted call (represented as &amp;quot;&lt;span style="color:#000080;"&gt;await&lt;/span&gt;&amp;nbsp;&lt;span style="color:#ff1493;font-weight:bold;"&gt;ref&lt;/span&gt;&amp;nbsp;taskAwaiter;&amp;quot; in the following code), followed by a goto to the label for the target state (using the information gained from the symbolic execution). We also remove the boilerplate associated with the $t__builder and the state dispatcher. For demonstration purposes, I&amp;#39;ll skip the remaining steps of the async/await decompiler and resume the pipeline to decompile the ILAst to C#, producing the following code:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;font-weight:bold;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color:#a52a2a;"&gt;async&lt;/span&gt;&amp;nbsp;&lt;span style="color:#ff0000;"&gt;void&lt;/span&gt;&amp;nbsp;&lt;span style="color:#191970;font-weight:bold;"&gt;AwaitInLoopCondition&lt;/span&gt;()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;font-weight:bold;"&gt;while&lt;/span&gt;&amp;nbsp;(&lt;span style="color:#008b8b;font-weight:bold;"&gt;true&lt;/span&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;TaskAwaiter&amp;lt;&lt;span style="color:#ff0000;font-weight:bold;"&gt;bool&lt;/span&gt;&amp;gt;&amp;nbsp;taskAwaiter =&amp;nbsp;&lt;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$&lt;span style="color:#00008b;"&gt;4&lt;/span&gt;__this.&lt;span style="color:#191970;font-weight:bold;"&gt;SimpleBoolTaskMethod&lt;/span&gt;().&lt;span style="color:#191970;font-weight:bold;"&gt;GetAwaiter&lt;/span&gt;();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;font-weight:bold;"&gt;if&lt;/span&gt;&amp;nbsp;(!taskAwaiter.IsCompleted)&lt;br /&gt;
&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;span style="color:#000080;"&gt;await&lt;/span&gt;&amp;nbsp;&lt;span style="color:#ff1493;font-weight:bold;"&gt;ref&lt;/span&gt;&amp;nbsp;taskAwaiter;&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;taskAwaiter =&amp;nbsp;&lt;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$u__$awaiter18;&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;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$u__$awaiter18 =&amp;nbsp;&lt;span style="color:#0000ff;font-weight:bold;"&gt;default&lt;/span&gt;(TaskAwaiter&amp;lt;&lt;span style="color:#ff0000;font-weight:bold;"&gt;bool&lt;/span&gt;&amp;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;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$&lt;span style="color:#00008b;"&gt;1&lt;/span&gt;__state =&amp;nbsp;-&lt;span style="color:#00008b;"&gt;1&lt;/span&gt;;&lt;br /&gt;
&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;&lt;span style="color:#ff0000;font-weight:bold;"&gt;bool&lt;/span&gt;&amp;nbsp;arg_8B_0 = taskAwaiter.&lt;span style="color:#191970;font-weight:bold;"&gt;GetResult&lt;/span&gt;();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;taskAwaiter =&amp;nbsp;&lt;span style="color:#0000ff;font-weight:bold;"&gt;default&lt;/span&gt;(TaskAwaiter&amp;lt;&lt;span style="color:#ff0000;font-weight:bold;"&gt;bool&lt;/span&gt;&amp;gt;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#0000ff;font-weight:bold;"&gt;if&lt;/span&gt;&amp;nbsp;(!arg_8B_0)&lt;br /&gt;
&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;span style="color:#000080;"&gt;break&lt;/span&gt;;&lt;br /&gt;
&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;Console.&lt;span style="color:#191970;font-weight:bold;"&gt;WriteLine&lt;/span&gt;(&lt;span style="color:#0000ff;"&gt;&amp;quot;Body&amp;quot;&lt;/span&gt;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;As you can see, this transformation has simplified the control flow of the method dramatically.&lt;/p&gt;
&lt;p&gt;We now just perform some finishing touches on the method:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Access to the state machine fields is replaced with local variable access, e.g. &amp;quot;&lt;span style="font-weight:bold;"&gt;this&lt;/span&gt;.$&lt;span style="color:#00008b;"&gt;4&lt;/span&gt;__this&amp;quot; becomes &amp;quot;&lt;span style="font-weight:bold;"&gt;this&lt;/span&gt;&amp;quot;.&lt;/li&gt;
&lt;li&gt;We detect the &amp;quot;&lt;span style="color:#191970;font-weight:bold;"&gt;GetAwaiter&lt;/span&gt;() / &lt;span style="color:#0000ff;font-weight:bold;"&gt;if&lt;/span&gt;&amp;nbsp;(!taskAwaiter.IsCompleted) / &lt;span style="color:#191970;font-weight:bold;"&gt;GetResult&lt;/span&gt;() / clear awaiter&amp;quot; pattern and replace it with a simple await expression&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mind that all of this isn&amp;#39;t done on the C# representation, but in an early stage of the ILAst pipeline. After some simplifications (variable inlining, copy propagation), the resulting ILAst looks like this:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;"&gt;br&lt;/span&gt;(IL_23)&lt;br /&gt;
IL_16:&lt;br /&gt;
&lt;span style="color:#0000ff;"&gt;call&lt;/span&gt;(Console::WriteLine,&amp;nbsp;&lt;span style="color:#0000ff;"&gt;ldstr&lt;/span&gt;(&lt;span style="color:#ff00ff;"&gt;&amp;quot;Body&amp;quot;&lt;/span&gt;))&lt;br /&gt;
IL_23:&lt;br /&gt;
&lt;span style="color:#0000ff;"&gt;brtrue&lt;/span&gt;(IL_16, await(&lt;span style="color:#0000ff;"&gt;callvirt&lt;/span&gt;(Async::SimpleBoolTaskMethod,&amp;nbsp;&lt;span style="color:#0000ff;"&gt;ldloc&lt;/span&gt;(this))))&lt;br /&gt;
&lt;span style="color:#0000ff;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;ret&lt;/span&gt;()&lt;/p&gt;
&lt;p&gt;Apart from the &amp;#39;await&amp;#39; opcode, this is exactly the same as the while-loop would look in a non-async method. The remainder of the decompiler pipeline will detect the loop and translate it to the C# code you&amp;#39;ve seen in the introductory screenshot.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=40075" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/danielgrunwald/archive/tags/ILSpy/default.aspx">ILSpy</category><category domain="http://community.sharpdevelop.net/blogs/danielgrunwald/archive/tags/async/default.aspx">async</category></item><item><title>ILSpy 2.0 Final</title><link>http://community.sharpdevelop.net/blogs/christophwille/archive/2012/04/15/ilspy-2-0-final.aspx</link><pubDate>Sun, 15 Apr 2012 10:39:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:40056</guid><dc:creator>ChristophWille</dc:creator><slash:comments>4</slash:comments><description>&lt;p&gt;Today, we released ILSpy 2.0 final to the Web:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sourceforge.net/projects/sharpdevelop/files/ILSpy/2.0/ILSpy_Master_2.0.0.1595_RTW_Binaries.zip/download"&gt;ILSpy_Master_2.0.0.1595_RTW_Binaries.zip&lt;/a&gt;&lt;br /&gt;&lt;a href="http://sourceforge.net/projects/sharpdevelop/files/ILSpy/2.0/ILSpy_Master_2.0.0.1595_RTW_Source.zip/download"&gt;ILSpy_Master_2.0.0.1595_RTW_Source.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Daniel&amp;#39;s &lt;a href="http://community.sharpdevelop.net/blogs/danielgrunwald/archive/2012/02/16/ilspy-2-0-beta-1.aspx"&gt;Beta feature post&lt;/a&gt; still applies to the release version:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Assembly Lists&lt;/li&gt;
&lt;li&gt;Support for decompiling Expression trees&lt;/li&gt;
&lt;li&gt;Support for lifted operatores on nullables&lt;/li&gt;
&lt;li&gt;Decompile to Visual Basic&lt;/li&gt;
&lt;li&gt;Search for multiple strings separated by space (searching for &amp;quot;Assembly manager&amp;quot; in ILSpy.exe would find AssemblyListManager)&lt;/li&gt;
&lt;li&gt;Clicking on a local variable will highlight all other occurrences of that variable&lt;/li&gt;
&lt;li&gt;Ctrl+F can be used to search within the decompiled code view&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, one thing changed for the binaries distribution: we do not include the debugger addin by default (it is part of the source download). The reason is that it is not stable enough - we&amp;acute;re improving the debugger in SharpDevelop and don&amp;acute;t have the resources to port those changes over to ILSpy just yet.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=40056" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/christophwille/archive/tags/ILSpy/default.aspx">ILSpy</category></item><item><title>SharpDevelop 4.2: Debugging C# 5 async methods</title><link>http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/2012/03/10/sharpdevelop-4-2-debugging-c-5-async-methods.aspx</link><pubDate>Sat, 10 Mar 2012 20:38:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:38840</guid><dc:creator>siegi44</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;As Chris already announced in a previous blog post, SharpDevelop 4.2 and later will support targeting .NET 4.5. One of the interesting new features in .NET 4.5/C# 5 is async. If you have already tried debugging an async method, you will have noticed, that SharpDevelop&amp;#39;s debugger is unable to evaluate any local variables.&lt;/p&gt;
&lt;p&gt;In short this is because async is - similar to iterator blocks (yield return) - implemented as state machine in a compiler-generated struct. So the debugger has to find the correct location (i.e. compiler-generated code) where all the local variable&amp;#39;s values are stored.&lt;/p&gt;
&lt;p&gt;In the most recent &lt;a target="_blank" href="http://build.sharpdevelop.net/BuildArtefacts/#SDMAIN"&gt;nightly builds&lt;/a&gt;  of SharpDevelop 4.2 Beta 2 (starting with build 4.2.0.8661), we&amp;#39;ve applied the necessary plumbing to make it work. But see for yourself:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/siegfriedpammer/images/38839/original.aspx" border="0" alt="" /&gt;&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=38840" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/SharpDevelop/default.aspx">SharpDevelop</category><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/4.2/default.aspx">4.2</category><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/Debugger/default.aspx">Debugger</category></item><item><title>Project Behaviors - Extensibility in the Project System</title><link>http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/2012/03/04/project-behaviors-extensibility-in-the-project-system.aspx</link><pubDate>Sun, 04 Mar 2012 14:00:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:38764</guid><dc:creator>siegi44</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;With the upcoming release of SharpDevelop 4.2, you get support for ASP.NET MVC projects based on IIS and IIS Express. We also want to give you debugging support. However this required some changes in our project system, because web development usually involves a web server and the IDE attaches its debugger to the web server when the project is run. This is fundamentally different from normal projects.&lt;/p&gt;
&lt;p&gt;Another point is that projects consist of different &amp;quot;project types&amp;quot;. For example a WPF project is usually C# + WPF or VB + WPF. An ASP.NET MVC project even consists of three parts: C#, web and MVC.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;The Solution&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Visual Studio solves this by inserting different project type GUIDs into the project file. Depending on the GUIDs it opens the project file with a different handler. While this approach is a good idea, its implementation in Visual Studio requires the project file to be read two times. First it is opened and scanned for the project type GUIDs and then opened again with an XML parser and finally loaded completely. (Source: [1])&lt;/p&gt;
&lt;p&gt;So each project type can have various sub-types defined by GUIDs. Scala implements such type compositions through &lt;a target="_blank" href="http://www.scala-lang.org/node/117"&gt;mixins&lt;/a&gt;. In fact we would need something like this (pseudo syntax):&lt;/p&gt;
&lt;p&gt;var mvcProject = new CSharpProject() with WebSupport(), MVCSupport();&lt;/p&gt;
&lt;p&gt;Of course this is not possible in C#. So we borrowed this concept and implemented it through project behavior chains, as described below:&lt;/p&gt;
&lt;p&gt;In SharpDevelop we first load the project file into an IProject container. Which container to use is defined by the file extension. So there is a CSharpProject (.csproj), VBProject (.vbproj) or FSharpProject (.fsproj) and so on. After the container is initialized and the file has been loaded, we look for the project type GUIDs and then load all the project behaviors that apply to the different GUIDs.&lt;/p&gt;
&lt;p&gt;A project behavior is a set of virtual methods that can be overridden to alter certain behavior of the project (for example Start, which starts the project with or without debugger). Project behaviors are chained together in the order they appear in the AddIn Tree. If a project behavior does not want to handle a certain call, it is passed onto the next project behavior. At the end of the chain there is the default project behavior which implements the defaults for each project type.&lt;/p&gt;
&lt;p&gt;This change allows AddIns to implement different handlers for different projects without modifying the whole project system and/or the debugger.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[1] &lt;a target="_blank" href="http://connect.microsoft.com/VisualStudio/feedback/details/481981/adding-a-file-named-projecttypeguids-cs-to-a-library-project-causes-following-error-the-project-type-is-not-supported-by-this-installation"&gt;http://connect.microsoft.com/VisualStudio/feedback/details/481981/adding-a-file-named-projecttypeguids-cs-to-a-library-project-causes-following-error-the-project-type-is-not-supported-by-this-installation&lt;/a&gt;&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=38764" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/SharpDevelop/default.aspx">SharpDevelop</category><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/4.2/default.aspx">4.2</category><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/project+system/default.aspx">project system</category></item><item><title>MSBuild Multi-Targeting in SharpDevelop</title><link>http://community.sharpdevelop.net/blogs/danielgrunwald/archive/2012/03/04/msbuild-multi-targeting-in-sharpdevelop.aspx</link><pubDate>Sun, 04 Mar 2012 12:40:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:38765</guid><dc:creator>DanielGrunwald</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;SharpDevelop has had multi-targeting support for a long time - for example, SharpDevelop 2.0 supported targeting .NET 1.0, 1.1 and 2.0. Our original multi-targeting implementation would not only change the target framework, but also use the matching C# compiler version*.&lt;/p&gt;
&lt;p&gt;When Visual Studio 2008 and MSBuild 3.5 came along and introduced official multi-targeting support, we &lt;a href="http://laputa.sharpdevelop.net/CommentView,guid,7aea4c39-6dd2-4598-8a4b-3244e724c416.aspx"&gt;separated&lt;/a&gt; the &amp;#39;target framework&amp;#39; and &amp;#39;compiler version&amp;#39; settings. The &amp;#39;target framework&amp;#39; setting uses the &amp;lt;TargetFrameworkVersion&amp;gt; MSBuild property, which is the official multi-targeting support as in Visual Studio 2008. The &amp;#39;compiler version&amp;#39; setting determines the MSBuild ToolsVersion, which controls the version of the C# compiler to use - Visual Studio does not have this feature.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll call the latter feature &lt;b&gt;MSBuild Multi-Targeting&lt;/b&gt;, as this allows us to pick the MSBuild version to use, and thus enables SharpDevelop to open and edit VS 2005 or 2008 projects without having to upgrade them to the VS 2010 project format.&lt;/p&gt;
&lt;p&gt;Unfortunately, life isn&amp;#39;t as simple as that. It turns out that MSBuild 4.0 is unable to compile projects with a ToolsVersion lower than 4.0 if the Windows SDK 7.1 is not installed. To allow users to use SharpDevelop without downloading the Windows SDK, we implemented a simple fix: &lt;b&gt;we use MSBuild 3.5 to compile projects &lt;/b&gt;&lt;b&gt;with a ToolsVersion of 2.0 or 3.5&lt;/b&gt;. This is why SharpDevelop ships with both 
&amp;quot;ICSharp&amp;shy;Code.Sharp&amp;shy;Develop.Build&amp;shy;Worker40.exe&amp;quot; and 
&amp;quot;ICSharp&amp;shy;Code.Sharp&amp;shy;Develop.Build&amp;shy;Worker35.exe&amp;quot;.&lt;/p&gt;
&lt;p&gt;Now what happens if SharpDevelop is run on a machine without .NET 3.5? If the framework specified by the &amp;#39;ToolsVersion&amp;#39; is missing, SharpDevelop crashed with an MSBuild error when opening the project. There were also crashes when creating/upgrading projects to missing ToolsVersions. Moreover, in the rare scenario where .NET 2.0 and .NET 4.0 are installed, but .NET 3.5 is missing, SharpDevelop was able to open the project but the build worker would crash when trying to compile.&lt;/p&gt;
&lt;p&gt;For this reason, the SharpDevelop 4.0 and 4.1 setups require both&amp;nbsp; .NET 3.5 and .NET 4.0 to be installed. This wasn&amp;#39;t an issue when we made that decision - .NET 3.5 is likely to be already installed on most machines. However, Windows 8 will change that - .NET 4.5 is installed by default, but .NET 3.5 is missing. So we added the necessary error handling to SharpDevelop 4.2. &lt;b&gt;The SharpDevelop 4.2 setup no longer requires .NET 3.5&lt;/b&gt; - you&amp;#39;ll need it only when targeting .NET 2.0/3.0 or 3.5.&lt;/p&gt;
&lt;p&gt;Another issue is that .NET 4.0 does not ship with the &lt;b&gt;Reference Assemblies&lt;/b&gt; - you need to install the Windows SDK to get those. This causes MSBuild to reference the assemblies in the GAC instead, which might be a later version (due to installed service packs or in-place upgrades like .NET 4.5), and also emit massive amounts of warnings (one warning per reference). Moreover, it caused the &amp;#39;Copy Local&amp;#39; flag to default to &lt;b&gt;true&lt;/b&gt; for references to .NET assemblies, causing System.dll etc. to be copied into the output directory.&lt;/p&gt;
&lt;p&gt;At the time, the reference assemblies were only available as part of Visual Studio 2010 - the free Windows SDK 7.1 was released later. So it was a high priority for us to work around this problem. For this reason, SharpDevelop injects a custom MSBuild .targets file into the project being built: SharpDevelop.TargetingPack.targets. This file runs a simple custom MSBuild task that detects references to default .NET assemblies and sets the &amp;#39;Copy Local&amp;#39; flag to false. (we also inject several other custom .targets files; for example for running FxCop or StyleCop as part of a build)&lt;/p&gt;
&lt;p&gt;We used the Microsoft.Build.Utitilies.dll when implementing this custom task. However, that library ships only with .NET 2.0, not with .NET 4.0, so we had to switch to Microsoft.Build.Utitilies.v4.dll to get the C# 4.0 build working without .NET 2.0. This should not be a problem as the copy local workaround is only included when targeting .NET 4.0 or higher, so we won&amp;#39;t try to load it the 3.5 build worker process.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To summarize, the &lt;b&gt;SharpDevelop 4.2 setup requires&lt;/b&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Windows XP SP2 or higher&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0a391abd-25c1-4fc0-919f-b21f31ab88b7&amp;amp;displaylang=en"&gt;.NET 4.0 Full&lt;/a&gt; (.NET 4.5 Full will also work)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=5582"&gt;VC++ 2008 runtime&lt;/a&gt; (part of .NET 3.5 so most people have it already)&lt;/li&gt;
&lt;li&gt;In the minimal configuration, you can only compile for .NET 4.0 using MSBuild 4.0.&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Additionally:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If .NET 4.5 is installed, the C# 5 compiler will replace the C# 4 compiler; and .NET 4.5 will appear as an additional target framework.&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;If &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=ab99342f-5d1a-413d-8319-81da479ab0d7&amp;amp;displaylang=en"&gt;.NET 3.5 SP1&lt;/a&gt; is installed, you will be able to use .NET 2.0/3.0/3.5 as target framework, and C# 2 and C# 3 as compiler versions.&lt;/li&gt;
&lt;li&gt;Installing the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=6B6C21D2-2006-4AFA-9702-529FA782D63B&amp;amp;displaylang=en"&gt;Windows SDK 7.1&lt;/a&gt; is highly recommended (provides reference assemblies and documentation for code completion).&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;Some SharpDevelop features might require installation of additional tools such as &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=6544"&gt;FxCop&lt;/a&gt;, &lt;a href="http://code.msdn.microsoft.com/sourceanalysis"&gt;StyleCop&lt;/a&gt;,&amp;nbsp;&lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=effc5bc4-c3df-4172-ad1c-bc62935861c5"&gt;F#&lt;/a&gt;, &lt;a href="http://tortoisesvn.net/"&gt;TortoiseSVN&lt;/a&gt;, &lt;a href="http://shfb.codeplex.com/"&gt;SHFB&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;* Everything said about the C# compiler in this post also applies to the VB compiler.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=38765" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/danielgrunwald/archive/tags/MSBuild/default.aspx">MSBuild</category></item><item><title>SharpDevelop Platform Roadmap</title><link>http://community.sharpdevelop.net/blogs/christophwille/archive/2012/03/03/sharpdevelop-platform-roadmap.aspx</link><pubDate>Sat, 03 Mar 2012 14:31:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:38752</guid><dc:creator>ChristophWille</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;We have waited till the Beta phase of .NET Framework 4.5 to finally decide on our platform story - what will be supported and what will be required.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;SharpDevelop 4.x&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;It will continue to require .NET 4.0 as its runtime, but it will also run on .NET 4.5 (if you upgraded your machine). It supports (as compilation targets) 2.0 to 4.5 - if those frameworks are installed on your machine.&lt;/p&gt;
&lt;p&gt;We are currently wrapping up feature development for 4.2, and we have plans for a further feature release 4.3. After that, the current plans are for servicing releases that update dependencies and/or fix bugs. Given those plans, expect 4.x releases for at least a year to come.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;SharpDevelop 5 &amp;quot;Zimnitz&amp;quot;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;This has been in development for some time already, and you have seen &amp;quot;offsprings&amp;quot; like ILSpy or Code Quality Analysis in SharpDevelop 4.2 to &amp;quot;prove&amp;quot; that our new NRefactory (*) is up to the job. Given that all IDE services need to be adapted to the new infrastructure, we will also take advantage of features in .NET 4.5, thus upping the requirements of SharpDevelop.&lt;/p&gt;
&lt;p&gt;However, this means for a considerable part of our current user base to start planning for the future - because .NET 4.5 will likely not support XP (maybe not even Vista). Betas of SD5 will start showing up later this year.&lt;/p&gt;
&lt;p&gt;Although the requirements change, the support of frameworks stays the same. (you will only have to install a newer OS on your development machine, deployment is unaffected)&lt;/p&gt;
&lt;p&gt;* NRefactory 5 is developed together with the MonoDevelop team, and will support features such as semantic highlighting or more (sophisticated) refactorings.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=38752" width="1" height="1"&gt;</description></item><item><title>Soon on Your Computer - SD 4.2 Beta 2</title><link>http://community.sharpdevelop.net/blogs/christophwille/archive/2012/03/03/soon-on-your-computer-sd-4-2-beta-2.aspx</link><pubDate>Sat, 03 Mar 2012 14:27:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:38751</guid><dc:creator>ChristophWille</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;With support for .NET 4.5, and yes, it does run on Windows 8 Consumer Preview too:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/photos/christophwille/images/38750/original.aspx" target="_blank"&gt;&lt;img src="http://community.sharpdevelop.net/photos/christophwille/images/38750/640x448.aspx" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=38751" width="1" height="1"&gt;</description></item><item><title>ILSpy 2.0 Beta 1</title><link>http://community.sharpdevelop.net/blogs/danielgrunwald/archive/2012/02/16/ilspy-2-0-beta-1.aspx</link><pubDate>Thu, 16 Feb 2012 17:45:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:38596</guid><dc:creator>DanielGrunwald</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;After a long pause, we have finally released the first Beta of ILSpy 2.0.&lt;/p&gt;
&lt;p&gt;Download:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://sourceforge.net/projects/sharpdevelop/files/ILSpy/2.0/ILSpy_Master_2.0.0.1564_Beta_Binaries.zip/download"&gt;ILSpy 2.0.0.1564 Beta Binaries.zip&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sourceforge.net/projects/sharpdevelop/files/ILSpy/2.0/ILSpy_Master_2.0.0.1564_Beta_Source.zip/download"&gt;ILSpy 2.0.0.1564 Beta Source Code.zip&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;New features compared with version 1.0:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Assembly Lists&lt;/li&gt;
&lt;li&gt;Support for decompiling Expression trees&lt;/li&gt;
&lt;li&gt;Support for lifted operatores on nullables&lt;/li&gt;
&lt;li&gt;Integrated Debugger&lt;/li&gt;
&lt;li&gt;Decompile to Visual Basic&lt;/li&gt;
&lt;li&gt;Search for multiple strings separated by space (searching for &amp;quot;Assembly manager&amp;quot; in ILSpy.exe would find AssemblyListManager)&lt;/li&gt;
&lt;li&gt;Clicking on a local variable will highlight all other occurrences of that variable&lt;/li&gt;
&lt;li&gt;Ctrl+F can be used to search within the decompiled code view&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=38596" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/danielgrunwald/archive/tags/ILSpy/default.aspx">ILSpy</category></item><item><title>SharpDevelop 4.2: Code Quality Analysis - Dependency Matrix</title><link>http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/2012/02/06/sharpdevelop-4-2-code-quality-analysis-dependency-matrix.aspx</link><pubDate>Mon, 06 Feb 2012 17:49:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:38474</guid><dc:creator>siegi44</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;In SharpDevelop 4.2 Beta we added a new feature which was partially developed by Tomas Linhart during GSoC 2010. Because it was never finished it took us some time to complete it after GSoC. One of the biggest changes after GSoC was the rewrite of the core engine. The engine now uses the new NRefactory 5 Type System in combination with Mono.Cecil.&lt;/p&gt;
&lt;p&gt;It is nearly done now, only little changes to the UI will be made until the final release of SharpDevelop 4.2.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/photos/siegfriedpammer/images/38475/original.aspx" target="_blank"&gt;&lt;img src="http://community.sharpdevelop.net/photos/siegfriedpammer/images/38475/624x480.aspx" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To launch the addin, simply select Analysis &amp;gt; Analyze Code Quality from the main menu. First you have to select a set of assemblies from the file system. After the analyzer completes the matrix above will be shown. The colours are&amp;nbsp; quite simple:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Green: left uses top&lt;/li&gt;
&lt;li&gt;Blue: left is used by top&lt;/li&gt;
&lt;li&gt;Turquoise: left uses and is used by top&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The numbers in the cells tell you how many dependencies there are from left to top or vice versa.&lt;/p&gt;
&lt;p&gt;For example this code:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;string&lt;/span&gt;&amp;nbsp;&lt;span style="color:#191970;"&gt;M&lt;/span&gt;(&lt;span style="color:#ff0000;"&gt;string&lt;/span&gt;&amp;nbsp;a)&amp;nbsp;{&amp;nbsp;&lt;span style="color:#000080;"&gt;return&lt;/span&gt;&amp;nbsp;a.&lt;span style="color:#191970;"&gt;ToLower&lt;/span&gt;();&amp;nbsp;}&lt;/p&gt;
&lt;p&gt;It has three usages of the type System.String and one usage of the method System.String.ToLower.&lt;/p&gt;
&lt;p&gt;But in our matrix we show only one dependency on System.String, otherwise the numbers would be too noisy. This shows that there is one class from mscorlib involved in the method M.&lt;/p&gt;
&lt;p&gt;This is only a preview and I hope it is useful to you. If you have any suggestions or find bugs, please feel free to post a comment below or on the forums.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=38474" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/SharpDevelop/default.aspx">SharpDevelop</category><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/4.2/default.aspx">4.2</category><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/Code+quality/default.aspx">Code quality</category></item><item><title>JavaScript Code Folding</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2012/02/05/JavaScriptCodeFolding.aspx</link><pubDate>Sun, 05 Feb 2012 15:53:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:38454</guid><dc:creator>MattWard</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;SharpDevelop 4.2 now includes support for JavaScript code 
    folding and code regions.&lt;/p&gt;
&lt;p&gt;When you open a JavaScript (.js) file into the text editor any 
    functions that are defined can be folded.&lt;/p&gt;
&lt;p&gt;&lt;img alt="JavaScript code folding in text editor" src="http://community.sharpdevelop.net/photos/mattward/images/original/JavaScriptCodeFolding.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;The text editor also supports code regions.&lt;/p&gt;
&lt;pre&gt;    //#region Canvas Test 
     
    tests[&amp;#39;canvas&amp;#39;] = function() { 
        var elem = document.createElement( &amp;#39;canvas&amp;#39; ); 
        return !!(elem.getContext &amp;amp;&amp;amp; elem.getContext(&amp;#39;2d&amp;#39;)); 
    }; 
     
    //#endregion&lt;/pre&gt;
&lt;p&gt;These regions can be folded as shown below.&lt;/p&gt;
&lt;p&gt;&lt;img alt="JavaScript code regions folded in the text editor" src="http://community.sharpdevelop.net/photos/mattward/images/original/JavaScriptCodeRegionFolding.aspx" /&gt;&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=38454" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/JavaScript/default.aspx">JavaScript</category></item><item><title>ASP.NET MVC Support</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2012/01/29/AspNetMvcSupport.aspx</link><pubDate>Sun, 29 Jan 2012 20:56:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:38370</guid><dc:creator>MattWard</dc:creator><slash:comments>4</slash:comments><description>&lt;p&gt;One of the new features in 
    &lt;a href="http://build.sharpdevelop.net/BuildArtefacts/"&gt;
    SharpDevelop 4.2&lt;/a&gt; is better support for ASP.NET MVC 3 
    applications. Previous versions contained project templates for 
    ASP.NET MVC but not much more. With SharpDevelop 4.2 the following 
    features have been added:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Razor project and file templates for C# and Visual Basic&lt;/li&gt;
&lt;li&gt;Razor syntax highlighting&lt;/li&gt;
&lt;li&gt;Add Controller dialog using T4 templates&lt;/li&gt;
&lt;li&gt;Add View dialog using T4 templates&lt;/li&gt;
&lt;li&gt;HTML folding&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now let us take at these new features.&lt;/p&gt;
&lt;h2&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Before using SharpDevelop you should install ASP.NET MVC 3 and 
    IIS, either IIS Express or full IIS. You can get MVC 3 and IIS 
    Express from &lt;a href="http://www.microsoft.com/web/platform/"&gt;
    Microsoft&amp;#39;s Web Platform installer&lt;/a&gt; or download them 
    directly from the following pages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=208140"&gt;ASP.NET 
      MVC 3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=1038"&gt;IIS 
      Express&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After installing IIS Express make sure that you run 
    IISExpress.exe once so it can generate its configuration files for 
    your user profile. If you do not then SharpDevelop will fail to 
    configure IIS Express.&lt;/p&gt;
&lt;h2&gt;Creating an ASP.NET MVC Application&lt;/h2&gt;
&lt;p&gt;Now we shall create a new C# ASP.NET MVC application that uses 
    the Razor view engine. First run SharpDevelop and then from the 
    &lt;b&gt;File&lt;/b&gt; menu select &lt;b&gt;New Solution&lt;/b&gt; to open the New Project 
    dialog.&lt;/p&gt;
&lt;p&gt;&lt;img alt="New ASP.NET MVC project dialog" src="http://community.sharpdevelop.net/photos/mattward/images/original/NewMvcProjectDialog.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;On the left in &lt;b&gt;Categories&lt;/b&gt; select &lt;b&gt;ASP.NET MVC&lt;/b&gt; under 
    &lt;b&gt;C#&lt;/b&gt;. On the right you will see three project templates.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Empty MVC Application - creates an MVC application with a 
      minimal set of files.&lt;/li&gt;
&lt;li&gt;MVC Application - creates an MVC application that uses the 
      Web Forms view engine (.aspx).&lt;/li&gt;
&lt;li&gt;Razor MVC Application - creates an MVC application that uses 
      the Razor view engine.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Select the Razor MVC Application project template. Enter a name 
    for the project and select a location where the project will be 
    created. Click &lt;b&gt;Create&lt;/b&gt; to create the MVC project. &lt;/p&gt;
&lt;p&gt;&lt;img alt="ASP.NET MVC project in Projects window" src="http://community.sharpdevelop.net/photos/mattward/images/original/RazorMvcProjectInProjectsWindow.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;If you open the &lt;b&gt;Projects&lt;/b&gt; window by selecting 
    &lt;b&gt;Projects&lt;/b&gt; from the &lt;b&gt;View&lt;/b&gt; menu you will see that the 
    project template created a &lt;b&gt;Home Controller&lt;/b&gt;, two Razor view 
    pages - &lt;b&gt;Index&lt;/b&gt; and &lt;b&gt;Contact&lt;/b&gt;, as well as installing the 
    jQuery and Modernizer NuGet packages.&lt;/p&gt;
&lt;h2&gt;Syntax Highlighting and Folding&lt;/h2&gt;
&lt;p&gt;If you open the a Razor file (.cshtml) you will see that there 
    is html folding and Razor syntax highlighting.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Razor syntax highlighting" src="http://community.sharpdevelop.net/photos/mattward/images/original/RazorSyntaxHighlightingLayoutPage.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;The Razor syntax highlighting is still under development and 
    does not work in all cases since it is not using Microsoft&amp;#39;s 
    Razor parser and uses a basic syntax definition file. In the 
    screenshot above, for example, the Razor @ symbol is not correctly 
    highlighted in the script and link tags.&lt;/p&gt;
&lt;h2&gt;Running an ASP.NET MVC Application&lt;/h2&gt;
&lt;p&gt;In order to be able to run your application first you will need 
    to configure the project to use IIS Express or IIS. From the 
    &lt;b&gt;Project&lt;/b&gt; menu select &lt;b&gt;Project Options&lt;/b&gt;. Select the 
    &lt;b&gt;Debug&lt;/b&gt; tab. At the bottom of this tab you will see options 
    for IIS Express and IIS.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IIS project options" src="http://community.sharpdevelop.net/photos/mattward/images/original/IISProjectOptions.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;For this walkthrough we will use IIS Express. Select IIS Express 
    and enter a port number. Then click the &lt;b&gt;Create 
    Applicaton/Virtual Directory&lt;/b&gt; button. A message will then be 
    displayed telling you that the application/virtual directory was 
    created successfully. Now we can run the application.&lt;/p&gt;
&lt;p&gt;To run the application select &lt;b&gt;Run&lt;/b&gt; from the &lt;b&gt;Debug&lt;/b&gt; 
    menu. IIS Express will then be launched and your application will 
    be loaded into your default web browser.&lt;/p&gt;
&lt;p&gt;&lt;img alt="ASP.NET MVC application running in browser" src="http://community.sharpdevelop.net/photos/mattward/images/original/AspMvcApplicationRunningInBrowser.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;You can set breakpoints in your application and debug your code 
    in the standard way. For example, set a breakpoint in the 
    HomeController&amp;#39;s Contact method and then click Contacts in 
    your browser and you will see SharpDevelop stop at the 
    breakpoint.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Breakpoint hit in HomeController Contact method" src="http://community.sharpdevelop.net/photos/mattward/images/original/BreakpointHitInHomeController.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;To stop debugging select &lt;b&gt;Stop process&lt;/b&gt; from the 
    &lt;b&gt;Debug&lt;/b&gt; menu. You will then see a prompt asking you to detach 
    or terminate the process being debugged, in this case IIS Express. 
    Detaching will leave IIS Express running.&lt;/p&gt;
&lt;h2&gt;File Templates&lt;/h2&gt;
&lt;p&gt;SharpDevelop includes a set of file templates for ASP.NET MVC 
    applications. You can create a new file using these templates by 
    selecting the project or a folder in the &lt;b&gt;Projects&lt;/b&gt; window, 
    right clicking and select &lt;b&gt;Add New Item&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="ASP.NET MVC file templates in New File Dialog" src="http://community.sharpdevelop.net/photos/mattward/images/original/AspNetMvcFileTemplatesInNewFileDialog.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;Select the appropriate template, give the file a name and click 
    &lt;b&gt;Create&lt;/b&gt; to add a new file to your project.&lt;/p&gt;
&lt;h2&gt;Add Controller Dialog&lt;/h2&gt;
&lt;p&gt;You can add a new controller to your project using a file 
    template as described in the previous section or you can use the 
    &lt;b&gt;Add Controller dialog&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;Select the &lt;b&gt;Controllers&lt;/b&gt; folder in the &lt;b&gt;Projects&lt;/b&gt; 
    window, right click and select &lt;b&gt;Add Controller&lt;/b&gt; to show the 
    &lt;b&gt;Add Controller dialog&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Add controller dialog" src="http://community.sharpdevelop.net/photos/mattward/images/original/AddControllerDialog.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;In the dialog you specify the controller&amp;#39;s name and select 
    one of the templates that will be used to generate the controller 
    class. These templates are defined by a single T4 template that you 
    can edit if you want to customise it. The T4 template exists in the 
    following subfolder where SharpDevelop was installed:&lt;/p&gt;
&lt;p&gt;AddIns\BackendBindings\AspNet.Mvc\ItemTemplates&lt;/p&gt;
&lt;p&gt;Click the &lt;b&gt;Add&lt;/b&gt; button to create a new controller from the 
    T4 template.&lt;/p&gt;
&lt;h2&gt;Add View Dialog&lt;/h2&gt;
&lt;p&gt;A new view can be created by using a file template or by using 
    the &lt;b&gt;Add View dialog&lt;/b&gt;. Select one of the &lt;b&gt;Views&lt;/b&gt; folders, 
    right click and select &lt;b&gt;Add New View&lt;/b&gt; to show the &lt;b&gt;Add View 
    dialog&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Add view dialog" src="http://community.sharpdevelop.net/photos/mattward/images/original/AddViewDialog.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;In the dialog you can specify the following items:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;View Name&lt;/b&gt; - specifies the name of the view&lt;/li&gt;
&lt;li&gt;&lt;b&gt;View Engine&lt;/b&gt; - selects either web forms (ASPX) or Razor 
      view engine. The options displayed in the dialog will change 
      based on this selection.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Strongly Typed&lt;/b&gt; - allows you to generate a view based 
      on a type in your project.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Model&lt;/b&gt; - a list of types in your project. You may have 
      to compile your project for a class to be displayed in this drop 
      down.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Template&lt;/b&gt; - specifies which of the T4 templates will be 
      used when generating the view. Templates available are - Empty, 
      Create, Delete, Details, Edit, List.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Use Layout&lt;/b&gt; (Razor) - specifies whether the view will 
      use a layout.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Layout&lt;/b&gt; (Razor) - specifies the path to the layout 
      page. The browse button allows you to select a layout page from 
      those in your project.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;User Master Page&lt;/b&gt; (ASPX) - specifies whether the view 
      will use a master page.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Master Page&lt;/b&gt; (ASPX) - specifies the path to the master 
      page. The browse button allows you to select a master page from 
      those in your project.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Main Content ID&lt;/b&gt; (ASPX) - specifies the main content 
      ID.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Partial View&lt;/b&gt; - used to generate a partial view.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Views generated from this dialog use T4 templates which exist in 
    the following folder if you need to customise them:&lt;/p&gt;
&lt;p&gt;AddIns\BackendBindings\AspNet.Mvc\ItemTemplates&lt;/p&gt;
&lt;p&gt;That concludes the walkthrough of the new ASP.NET MVC 3 support 
    in SharpDevelop. Further information on ASP.NET MVC 3 can be found 
    at the &lt;a href="http://www.asp.net/mvc"&gt;Getting Started with 
    ASP.NET MVC&lt;/a&gt; page. &lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=38370" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/ASPNet/default.aspx">ASPNet</category><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/AspNetMvc/default.aspx">AspNetMvc</category></item><item><title>New Icons for SharpDevelop</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2012/01/21/NewIconsForSharpDevelop.aspx</link><pubDate>Sat, 21 Jan 2012 17:55:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:38273</guid><dc:creator>MattWard</dc:creator><slash:comments>6</slash:comments><description>&lt;p&gt;Thanks to &lt;a href="http://p.yusukekamiyamane.com/"&gt;Yusuke 
    Kamiyamane&amp;#39;s Fugue Icons&lt;/a&gt;, and icons created and remixed by 
    Michael Seeger, SharpDevelop 4.2 has a new look. A selection of 
    before and after screenshots are shown below:&lt;/p&gt;
&lt;p&gt;&lt;b&gt;SharpDevelop 4.1 Toolbar&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Old toolbar" src="http://community.sharpdevelop.net/photos/mattward/images/original/SharpDevelopToolbarOld.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;SharpDevelop 4.2 Toolbar&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="New toolbar" src="http://community.sharpdevelop.net/photos/mattward/images/original/SharpDevelopToolbarNew.aspx" /&gt;&lt;/p&gt;
&lt;table class="none  " cellpadding="10"&gt;

&lt;tr&gt;
&lt;th&gt;SharpDevelop 4.1&lt;/th&gt;&lt;th&gt;SharpDevelop 4.2&lt;/th&gt;
&lt;/tr&gt;


&lt;tr&gt;
&lt;td&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/SharpDevelopProjectsWindowOld.aspx" alt="" /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/SharpDevelopProjectsWindowNew.aspx" alt="" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/SharpDevelopClassesWindowOld.aspx" alt="" /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/SharpDevelopClassesWindowNew.aspx" alt="" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/SharpDevelopProjectIconsOld.aspx" alt="" /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/SharpDevelopProjectIconsNew.aspx" alt="" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/SharpDevelopUnitTestsWindowOld.aspx" alt="" /&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/SharpDevelopUnitTestsWindowNew.aspx" alt="" /&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;/table&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=38273" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/Icons/default.aspx">Icons</category></item><item><title>Output pad: Ported to WPF and added search functionality</title><link>http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/2012/01/05/output-pad-ported-to-wpf-and-added-search-functionality.aspx</link><pubDate>Thu, 05 Jan 2012 19:51:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:38120</guid><dc:creator>siegi44</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;While hunting a bug related to Windows Forms, we decided to move the output pad to WPF. It now uses AvalonEdit instead of a textbox and we added support for file hyperlinks (C#, VB and NUnit); additionally you can now search through debug output by pressing Ctrl+F while the output pad is focused.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/siegfriedpammer/images/38119/original.aspx" border="0" alt="" /&gt;&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=38120" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/SharpDevelop/default.aspx">SharpDevelop</category><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/4.2/default.aspx">4.2</category></item><item><title>Decompilation of Object / Collection Initializers with ILSpy</title><link>http://community.sharpdevelop.net/blogs/christophwille/archive/2011/12/19/decompilation-of-object-collection-initializers-with-ilspy.aspx</link><pubDate>Mon, 19 Dec 2011 15:02:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:37933</guid><dc:creator>ChristophWille</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;If you test a method like the following:&lt;/p&gt;
&lt;pre style="font-family:Consolas;font-size:16px;color:black;background:none repeat scroll 0% 0% white;"&gt;        &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; TestWithUnusedVariables()
        {
            &lt;span style="color:blue;"&gt;var&lt;/span&gt; x = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Demo&lt;/span&gt;()
            {
                SomeProperty = &lt;span style="color:#a31515;"&gt;&amp;quot;Hello World&amp;quot;&lt;/span&gt;
            };
 
            &lt;span style="color:blue;"&gt;var&lt;/span&gt; y = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;Demo&lt;/span&gt;&amp;gt;
            {
                &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Demo&lt;/span&gt;() {
                    SomeProperty = &lt;span style="color:#a31515;"&gt;&amp;quot;nada&amp;quot;&lt;/span&gt;
                    },
                &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Demo&lt;/span&gt;()
                    {
                        SomeProperty = &lt;span style="color:#a31515;"&gt;&amp;quot;nix&amp;quot;&lt;/span&gt;
                    }
            };
        }&lt;/pre&gt;
&lt;p&gt;And decompile with ILSpy you might be thinking that object / collection intializers are not being detected:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;font-weight:bold;"&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style="color:#a52a2a;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="color:#ff0000;"&gt;void&lt;/span&gt;&amp;nbsp;&lt;span style="color:#191970;font-weight:bold;"&gt;TestWithUnusedVariables&lt;/span&gt;&lt;span style="color:#006400;"&gt;()&lt;/span&gt;&lt;br /&gt;
&lt;span style="color:#006400;"&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Demo demo =&amp;nbsp;&lt;span style="color:#008b8b;font-weight:bold;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color:#191970;font-weight:bold;"&gt;Demo&lt;/span&gt;&lt;span style="color:#006400;"&gt;();&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;demo&lt;span style="color:#006400;"&gt;.&lt;/span&gt;SomeProperty =&amp;nbsp;&lt;span style="color:#0000ff;"&gt;&amp;quot;Hello World&amp;quot;&lt;/span&gt;&lt;span style="color:#006400;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;List&lt;span style="color:#006400;"&gt;&amp;lt;&lt;/span&gt;Demo&lt;span style="color:#006400;"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;list =&amp;nbsp;&lt;span style="color:#008b8b;font-weight:bold;"&gt;new&lt;/span&gt;&amp;nbsp;List&lt;span style="color:#006400;"&gt;&amp;lt;&lt;/span&gt;Demo&lt;span style="color:#006400;"&gt;&amp;gt;();&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;list&lt;span style="color:#006400;"&gt;.&lt;/span&gt;&lt;span style="color:#191970;font-weight:bold;"&gt;Add&lt;/span&gt;&lt;span style="color:#006400;"&gt;(&lt;/span&gt;&lt;span style="color:#008b8b;font-weight:bold;"&gt;new&lt;/span&gt;&amp;nbsp;Demo&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SomeProperty =&amp;nbsp;&lt;span style="color:#0000ff;"&gt;&amp;quot;nada&amp;quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;});&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;list&lt;span style="color:#006400;"&gt;.&lt;/span&gt;&lt;span style="color:#191970;font-weight:bold;"&gt;Add&lt;/span&gt;&lt;span style="color:#006400;"&gt;(&lt;/span&gt;&lt;span style="color:#008b8b;font-weight:bold;"&gt;new&lt;/span&gt;&amp;nbsp;Demo&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SomeProperty =&amp;nbsp;&lt;span style="color:#0000ff;"&gt;&amp;quot;nix&amp;quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;});&lt;/span&gt;&lt;br /&gt;
&lt;span style="color:#006400;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Well, you are right. The reason being that the compilers sees that my user variables are not being used, thus optimizing the code by only keeping the compiler-generated ones, thus making it impossible for us to correctly detect the initializer.&lt;/p&gt;
&lt;p&gt;However, if you use the variables&lt;/p&gt;
&lt;pre style="font-family:Consolas;font-size:16px;color:black;background:none repeat scroll 0% 0% white;"&gt;        &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; TestWithUsedVariables()
        {
            &lt;span style="color:blue;"&gt;var&lt;/span&gt; x = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Demo&lt;/span&gt;()
            {
                SomeProperty = &lt;span style="color:#a31515;"&gt;&amp;quot;Hello World&amp;quot;&lt;/span&gt;
            };
 
            &lt;span style="color:blue;"&gt;var&lt;/span&gt; y = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;Demo&lt;/span&gt;&amp;gt;
            {
                &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Demo&lt;/span&gt;() {
                    SomeProperty = &lt;span style="color:#a31515;"&gt;&amp;quot;nada&amp;quot;&lt;/span&gt;
                    },
                &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Demo&lt;/span&gt;()
                    {
                        SomeProperty = &lt;span style="color:#a31515;"&gt;&amp;quot;nix&amp;quot;&lt;/span&gt;
                    }
            };
 
            x.SomeProperty = &lt;span style="color:#a31515;"&gt;&amp;quot;noch was&amp;quot;&lt;/span&gt;;
            &lt;span style="color:blue;"&gt;var&lt;/span&gt; z = y.Count();
        }&lt;/pre&gt;
&lt;p&gt;ILSpy will correctly come up with proper decompiled code:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;font-weight:bold;"&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style="color:#a52a2a;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="color:#ff0000;"&gt;void&lt;/span&gt;&amp;nbsp;&lt;span style="color:#191970;font-weight:bold;"&gt;TestWithUsedVariables&lt;/span&gt;&lt;span style="color:#006400;"&gt;()&lt;/span&gt;&lt;br /&gt;
&lt;span style="color:#006400;"&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Demo x =&amp;nbsp;&lt;span style="color:#008b8b;font-weight:bold;"&gt;new&lt;/span&gt;&amp;nbsp;Demo&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SomeProperty =&amp;nbsp;&lt;span style="color:#0000ff;"&gt;&amp;quot;Hello World&amp;quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;};&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;List&lt;span style="color:#006400;"&gt;&amp;lt;&lt;/span&gt;Demo&lt;span style="color:#006400;"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;y =&amp;nbsp;&lt;span style="color:#008b8b;font-weight:bold;"&gt;new&lt;/span&gt;&amp;nbsp;List&lt;span style="color:#006400;"&gt;&amp;lt;&lt;/span&gt;Demo&lt;span style="color:#006400;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008b8b;font-weight:bold;"&gt;new&lt;/span&gt;&amp;nbsp;Demo&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;{&lt;/span&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;SomeProperty =&amp;nbsp;&lt;span style="color:#0000ff;"&gt;&amp;quot;nada&amp;quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;},&lt;/span&gt;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#008b8b;font-weight:bold;"&gt;new&lt;/span&gt;&amp;nbsp;Demo&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;{&lt;/span&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;SomeProperty =&amp;nbsp;&lt;span style="color:#0000ff;"&gt;&amp;quot;nix&amp;quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;}&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;};&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x&lt;span style="color:#006400;"&gt;.&lt;/span&gt;SomeProperty =&amp;nbsp;&lt;span style="color:#0000ff;"&gt;&amp;quot;noch was&amp;quot;&lt;/span&gt;&lt;span style="color:#006400;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#ff0000;font-weight:bold;"&gt;int&lt;/span&gt;&amp;nbsp;z = y&lt;span style="color:#006400;"&gt;.&lt;/span&gt;Count&lt;span style="color:#006400;"&gt;&amp;lt;&lt;/span&gt;Demo&lt;span style="color:#006400;"&gt;&amp;gt;();&lt;/span&gt;&lt;br /&gt;
&lt;span style="color:#006400;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In the sense of a &amp;quot;variable being used&amp;quot; the decompilation also works for variables only used to pass back a value:&lt;/p&gt;
&lt;pre style="font-family:Consolas;font-size:16px;color:black;background:none repeat scroll 0% 0% white;"&gt;        &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Demo&lt;/span&gt; TestWithReturnValue()
        {
            &lt;span style="color:blue;"&gt;return&lt;/span&gt; &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Demo&lt;/span&gt;()
                {
                    SomeProperty = &lt;span style="color:#a31515;"&gt;&amp;quot;Hello World&amp;quot;&lt;/span&gt;
                };
        }&lt;/pre&gt;
&lt;p&gt;ILSpy output:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;font-weight:bold;"&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style="color:#a52a2a;"&gt;static&lt;/span&gt;&amp;nbsp;Demo&amp;nbsp;&lt;span style="color:#191970;font-weight:bold;"&gt;TestWithReturnValue&lt;/span&gt;&lt;span style="color:#006400;"&gt;()&lt;/span&gt;&lt;br /&gt;
&lt;span style="color:#006400;"&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#000080;"&gt;return&lt;/span&gt;&amp;nbsp;&lt;span style="color:#008b8b;font-weight:bold;"&gt;new&lt;/span&gt;&amp;nbsp;Demo&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SomeProperty =&amp;nbsp;&lt;span style="color:#0000ff;"&gt;&amp;quot;Hello World&amp;quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#006400;"&gt;};&lt;/span&gt;&lt;br /&gt;
&lt;span style="color:#006400;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Bottom line: object and collection initializers are being properly decompiled if we can ascertain that it actually is one.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=37933" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/christophwille/archive/tags/ILSpy/default.aspx">ILSpy</category></item><item><title>AvalonEdit 4.2: Virtual Space</title><link>http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/2011/11/27/avalonedit-4-2-virtual-space.aspx</link><pubDate>Sun, 27 Nov 2011 08:38:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:37737</guid><dc:creator>siegi44</dc:creator><slash:comments>7</slash:comments><description>&lt;p&gt;In recent builds of SharpDevelop 4.2 and AvalonEdit I implemented the &amp;quot;Virtual Space&amp;quot; feature. This feature allows you to place the caret after the end of the line. It was necessary to properly implement rectangle selection.&lt;/p&gt;
&lt;p&gt;You can enable it in the TextEditor by setting EnableVirtualSpace = true or in the SharpDevelop options. When a rectangle selection is active virtual space is enabled implicitly.&lt;/p&gt;
&lt;p&gt;For a detailed overview/explanation see the following:&lt;/p&gt;
&lt;p&gt; &lt;a href="http://community.sharpdevelop.net/blogs/siegfried_pammer/VirtualSpaceEN.png"&gt;&lt;img src="http://community.sharpdevelop.net/blogs/siegfried_pammer/VirtualSpaceEN.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I hope you find this useful. If you find any bugs or have a suggestion, please leave a comment!&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=37737" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/SharpDevelop/default.aspx">SharpDevelop</category><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/4.2/default.aspx">4.2</category><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/AvalonEdit/default.aspx">AvalonEdit</category></item><item><title>Machine.Specifications (MSpec)</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2011/11/09/MachineSpecifications.aspx</link><pubDate>Wed, 09 Nov 2011 22:07:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:37615</guid><dc:creator>MattWard</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Here is a preview of a new feature that is planned for 
    SharpDevelop - integrated support for Machine.Specifications.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/blogs/mattward/articles/machine.aspx"&gt;Machine.Specifications&lt;/a&gt;, or MSpec for short, is a 
    &lt;a href="http://en.wikipedia.org/wiki/Behavior_Driven_Development"&gt;
    Behaviour Driven Development&lt;/a&gt; framework for .NET created by 
    &lt;a href="http://codebetter.com/aaronjensen/2008/05/08/introducing-machine-specifications-or-mspec-for-short/"&gt;Aaron Jensen&lt;/a&gt; which takes its inspiration from 
    &lt;a href="http://code.google.com/p/specunit-net/"&gt;SpecUnit.NET&lt;/a&gt; 
    and &lt;a href="http://rspec.info/"&gt;RSpec&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Support for MSpec has been added thanks to 
    &lt;a href="http://blog.trecio.cba.pl"&gt;Tomasz Tretkowski&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So let us take a look at how the MSpec integration works in 
    SharpDevelop.&lt;/p&gt;
&lt;h2&gt;MSpec Integration&lt;/h2&gt;
&lt;p&gt;The first thing you will need to do is add a reference to MSpec 
    in the project that will contain your specifications. The easiest 
    way to do this is to use NuGet. Select your project, right click 
    and select &lt;b&gt;Manage Packages&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Manage Packages context menu" src="http://community.sharpdevelop.net/photos/mattward/images/original/MSpecManagePackagesContextMenu.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;Search for the &lt;b&gt;Machine.Specifications&lt;/b&gt; package and then 
    click the &lt;b&gt;Add&lt;/b&gt; button to add the NuGet package to your 
    project.&lt;/p&gt;
&lt;p&gt;&lt;img alt="MSpec NuGet package selected in Manage Packages dialog" src="http://community.sharpdevelop.net/photos/mattward/images/original/MSpecPackageInManagePackagesDialog.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;This will add a Machine.Specifications assembly reference to 
    your project.&lt;/p&gt;
&lt;p&gt;Now let us create our first specification. We are going to 
    create a specification which is based on an 
    &lt;a href="http://community.sharpdevelop.net/blogs/mattward/articles/Machine.Specifications.aspx"&gt;example&lt;/a&gt; provided with the MSpec source code. The specification 
    is for transferring an amount of money between two bank accounts 
    and is shown below.&lt;/p&gt;
&lt;pre&gt;using System; 
using Machine.Specifications; 
 
namespace Banking.Tests 
{ 
    [Subject(typeof(Account), &amp;quot;Funds transfer&amp;quot;)] 
    public class when_transferring_between_two_accounts 
    { 
        static Account fromAccount; 
        static Account toAccount; 
         
        Establish context = () =&amp;gt; { 
            fromAccount = new Account { Balance = 1m }; 
            toAccount = new Account { Balance = 1m }; 
        }; 
         
        Because of = () =&amp;gt; 
            fromAccount.Transfer(1m, toAccount); 
         
        It should_debit_the_from_account_by_the_amount_transferred = () =&amp;gt; 
            fromAccount.Balance.ShouldEqual(0m); 
         
        It should_credit_the_to_account_by_the_amount_transferred = () =&amp;gt; 
            toAccount.Balance.ShouldEqual(2m); 
    } 
}&lt;/pre&gt;
&lt;p&gt;MSpec uses &lt;b&gt;Establish&lt;/b&gt;/&lt;b&gt;Because&lt;/b&gt;/&lt;b&gt;It&lt;/b&gt; which is 
    equivalent to &lt;b&gt;Given&lt;/b&gt;/&lt;b&gt;When&lt;/b&gt;/&lt;b&gt;Then&lt;/b&gt; that is used 
    with SpecFlow. &lt;b&gt;Establish&lt;/b&gt; is used to setup the initial state. 
    &lt;b&gt;Because&lt;/b&gt; is used to define the event/action that you are 
    testing. &lt;b&gt;It&lt;/b&gt; is used to test the final state and see if it 
    matches what is expected.&lt;/p&gt;
&lt;p&gt;The Account class that is used by this specification is shown 
    below.&lt;/p&gt;
&lt;pre&gt;using System; 
 
namespace Banking 
{ 
    public class Account 
    { 
        public decimal Balance { get; set; } 
        
        public void Transfer(decimal amount, Account toAccount) 
        {             
        }
    } 
}&lt;/pre&gt;
&lt;p&gt;Specifications are displayed in the &lt;b&gt;Unit Tests&lt;/b&gt; window. 
    This window can be opened by selecting &lt;b&gt;Unit Tests&lt;/b&gt; from the 
    &lt;b&gt;View&lt;/b&gt; | &lt;b&gt;Tools&lt;/b&gt; menu. The specification we have defined 
    will be displayed in the Unit Test window as shown below.&lt;/p&gt;
&lt;p&gt;&lt;img alt="MSpec tests in Unit Tests window" src="http://community.sharpdevelop.net/photos/mattward/images/original/MSpecTestsInUnitTestsWindow.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;The Unit Tests window will update as the specification is 
    written in the same way it does when you are writing NUnit 
    tests.&lt;/p&gt;
&lt;p&gt;To run MSpec you can right click a specification and select 
    &lt;b&gt;Run tests&lt;/b&gt; or you can click the toolbar buttons at the top of 
    the Unit Tests window.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Run tests context menu in Unit Tests window" src="http://community.sharpdevelop.net/photos/mattward/images/original/RunMSpecTestsInUnitTestsWindow.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;Failures will be highlighted in Red in the Unit Tests window.&lt;/p&gt;
&lt;p&gt;&lt;img alt="MSpec failures in Unit Tests window" src="http://community.sharpdevelop.net/photos/mattward/images/original/MSpecFailuresInUnitTestsWindow.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;The output from MSpec is displayed in the &lt;b&gt;Output&lt;/b&gt; 
    window.&lt;/p&gt;
&lt;p&gt;&lt;img alt="MSpec runner output in Output window" src="http://community.sharpdevelop.net/photos/mattward/images/original/MSpecOutputInOutputWindow.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;Failures are also added to the &lt;b&gt;Errors&lt;/b&gt; window. Clicking on 
    an error will take you directly to the source code for the failing 
    test.&lt;/p&gt;
&lt;p&gt;&lt;img alt="MSpec failures in Errors window" src="http://community.sharpdevelop.net/photos/mattward/images/original/MSpecFailuresInOutputWindow.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;Now we have to fix the failures by implementing the 
    Account&amp;#39;s Transfer method. The updated Transfer method is 
    shown below:&lt;/p&gt;
&lt;pre&gt;public void Transfer(decimal amount, Account toAccount) 
{ 
    Balance -= amount; 
    toAccount.Balance += amount; 
}&lt;/pre&gt;
&lt;p&gt;After making this change and running MSpec again everything 
    passes, as shown below.&lt;/p&gt;
&lt;p&gt;&lt;img alt="MSpec passes shown in green in Unit Tests window" src="http://community.sharpdevelop.net/photos/mattward/images/original/MSpecPassesInUnitTestsWindow.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="MSpec success output in Output Window" src="http://community.sharpdevelop.net/photos/mattward/images/original/MSpecPassedTestsOutputInOutputWindow.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;That completes the quick introduction to using MSpec with 
    SharpDevelop. Now let us take a look at MSpec Behaviours.&lt;/p&gt;
&lt;h2&gt;MSpec Behaviours&lt;/h2&gt;
&lt;p&gt;MSpec Behaviours are a way to group together a set of tests that 
    you want to re-use with different contexts. To do this you create a 
    separate class, add a Behaviors attribute to it, and move your 
    tests into that class. This behaviour class is then referenced by 
    using the  &lt;b&gt;Behaves_like&lt;/b&gt; syntax. An example taken from the 
    &lt;a href="http://community.sharpdevelop.net/blogs/mattward/articles/Machine.Specifications.Example.aspx"&gt;MSpec examples&lt;/a&gt; is shown below.&lt;/p&gt;
&lt;pre&gt;using System; 
using Machine.Specifications; 
 
namespace Banking.Tests 
{ 
    [Subject(&amp;quot;Date time parsing&amp;quot;)] 
    public class when_a_date_is_parsed_with_the_regular_expression_parser 
     : DateTimeParsingSpecs 
    { 
        Establish context = () =&amp;gt;  
         Parser = new RegexParser(); 
 
        Because of = () =&amp;gt;  
         ParsedDate = Parser.Parse(&amp;quot;2009/01/21&amp;quot;); 
 
        Behaves_like&amp;lt;DateTimeParsingBehavior&amp;gt; a_date_time_parser; 
    } 
 
    [Subject(&amp;quot;Date time parsing&amp;quot;)] 
    public class when_a_date_is_parsed_by_the_infrastructure 
     : DateTimeParsingSpecs 
    { 
        Establish context = () =&amp;gt;  
         Parser = new InfrastructureParser(); 
 
        Because of = () =&amp;gt;  
         ParsedDate = Parser.Parse(&amp;quot;2009/01/21&amp;quot;); 
 
        Behaves_like&amp;lt;DateTimeParsingBehavior&amp;gt; a_date_time_parser; 
    } 
 
    public abstract class DateTimeParsingSpecs 
    { 
        protected static DateTime ParsedDate; 
        protected static IParser Parser; 
    } 
 
    [Behaviors] 
    public class DateTimeParsingBehavior 
    { 
        protected static DateTime ParsedDate; 
 
        It should_parse_the_expected_date = () =&amp;gt;  
            ParsedDate.ShouldEqual(new DateTime(2009, 1, 21)); 
    } 
}&lt;/pre&gt;
&lt;p&gt;Here the behaviour of the parser returning a particular date has 
    been extracted and re-used across two different contexts.&lt;/p&gt;
&lt;p&gt;SharpDevelop is aware of MSpec behaviours and will display the 
    underlying tests. The date time parser specifications above will be 
    displayed in the Unit Tests window as shown below.&lt;/p&gt;
&lt;p&gt;&lt;img alt="MSpec behaviours in Unit Tests window" src="http://community.sharpdevelop.net/photos/mattward/images/original/MSpecBehavioursInUnitTestsWindow.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;For further details on MSpec behaviours take a look at the 
    &lt;a href="http://lostechies.com/jamesgregory/2010/01/18/behaviours-in-mspec/"&gt;Behaviours in MSpec&lt;/a&gt; post by James Gregory.&lt;/p&gt;
&lt;h2&gt;Further MSpec Information&lt;/h2&gt;
&lt;p&gt;Here is a selection of links to further information on MSpec 
    that you may find useful.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/blogs/mattward/articles/machine.aspx"&gt;MSpec on Github&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://codebetter.com/aaronjensen/2008/05/08/introducing-machine-specifications-or-mspec-for-short/"&gt;Introducing MSpec&lt;/a&gt; - Aaron Jensen&amp;#39;s post that first 
    introduced MSpec.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://elegantcode.com/2010/02/19/getting-started-with-machine-specifications-mspec/"&gt;Getting Started with MSpec&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://wekeroad.com/mvc-storefront/kona-3/"&gt;Learning 
    BDD&lt;/a&gt; - If you prefer to learn by watching a video check out Rob 
    Conery&amp;#39;s BDD screencast where he discusses BDD and also covers 
    MSpec.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://wekeroad.com/blog/make-bdd-your-bff-2/"&gt;Make BDD 
    your BFF&lt;/a&gt; - Rob Conery walks through BDD with MSpec.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.awkwardcoder.com/index.php/2010/10/11/teaching-a-string-calculator-how-to-behave/"&gt;Teaching a String Calculator How to Behave&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lostechies.com/jamesgregory/2010/01/18/behaviours-in-mspec/"&gt;Behaviours in MSpec&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=37615" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/MSpec/default.aspx">MSpec</category></item><item><title>SharpDevelop 4.2: Search and Replace refurbished</title><link>http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/2011/11/05/sharpdevelop-4-2-search-and-replace-refurbished.aspx</link><pubDate>Sat, 05 Nov 2011 15:00:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:37573</guid><dc:creator>siegi44</dc:creator><slash:comments>6</slash:comments><description>&lt;p&gt;The Search and Replace engine used in SharpDevelop had a bad architecture. The concept of IDocumentIterator (for a number of documents) and ITextIterator (for a single document) leads to problems when doing manual &amp;quot;Find next&amp;quot; over multiple documents. It leads code duplication and there are lots of hacks to circumvent all sorts of bugs. &lt;/p&gt;
&lt;p&gt;In the most recent alpha builds of SharpDevelop 4.2 the core parts of the Search and Replace engine were rewritten. While rewriting the code I wanted to get rid of code duplication, bugs, special cases and improve performance of the search engine. In a first step I removed all the existing engine code.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Choosing a search algorithm&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;There are lots of debates on .NET string search algorithm on the net. Some propose to use IndexOf, because it seems faster than Regex, others suggest to implement your own &lt;i&gt;FastIndexOf&lt;/i&gt;. I choose to implement search using the Regex classes in the BCL for several reasons:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It is easier to maintain because it is less code. Additionally the Regex classes are well tested in contrast to a custom IndexOf.&lt;/li&gt;
&lt;li&gt;There are multiple search modes: Normal, Wildcards and Regex. For regex, of course, we had to use the Regex classes. Wildcards are easier to translate to regex and plain text search is fast enough (if not faster in some cases), when using compiled regex.&lt;/li&gt;
&lt;li&gt;Features like &amp;quot;Ignore case&amp;quot; and &amp;quot;Match whole words&amp;quot; are implemented with Regex easily. &amp;quot;Match whole words&amp;quot; is simply \bsearchTerm\b.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Using regex has helped to get rid of code duplication, bugs and special cases. I hope you agree with me and see the benefits of simplicity in contrast to micro and rare-case optimization.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;SearchPanel: Single file search - Integrated into the AvalonEdit text editor&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;In AvalonEdit 4.2 Ctrl+F functionality has been directly built into the editor. The normal Search and Replace dialog has been moved to Ctrl+Shift+F. Incremental and Quick find were removed, because the SearchPanel is a very powerful replacement.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/siegfriedpammer/images/37575/original.aspx" border="0" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;As you can see it offers some basic search options. You can use F3 to jump to the next match and Shift+F3 to move to the previous match.The SearchPanel will soon be integrated into ILSpy to allow full-text search in currently decompiled code.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Improving performance and usability of Find all in multiple files&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;One of the weaknesses of Find all in SharpDevelop was its speed on the one hand and on the other hand, it was locking up SharpDevelop so the user had to wait for Find all to complete.&lt;/p&gt;
&lt;p&gt;During the redesign of the search engine, we also focused on making it thread-safe. This requires to create a list of files to search through before doing the actual search. This causes some neglectable delay and overhead. The only case in which this would turn out really bad, is a recursive directory search starting from C:\ using *.* as file mask. But this is certainly not a common scenario when working with an IDE.&lt;/p&gt;
&lt;p&gt;The good news is, you can continue working while waiting for the search to complete. Please keep in mind that all changes you make to documents while Find all is active are not guaranteed to be recognized, depending on when the background thread processes the file.&lt;/p&gt;
&lt;p&gt;Another good news for all those of you with multi-core CPUs: SharpDevelop 4.2 will process multiple files in parallel and display all results in real-time. So you can work with the first results while the remaining files are processed. This is implemented using the IObservable&amp;lt;T&amp;gt; and IObserver&amp;lt;T&amp;gt; interfaces.&lt;/p&gt;
&lt;p&gt;These are the key features of the new search engine. I hope you like it. If you have any suggestions, please leave a comment.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=37573" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/SharpDevelop/default.aspx">SharpDevelop</category><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/4.2/default.aspx">4.2</category></item><item><title>SharpDevelop 4.2: Reimplemented "Create properties"</title><link>http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/2011/10/30/sharpdevelop-4-2-reimplemented-quot-create-properties-quot.aspx</link><pubDate>Sun, 30 Oct 2011 16:47:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:37517</guid><dc:creator>siegi44</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;One of the features still missing after &amp;quot;Alt+Ins&amp;quot; was removed, &amp;quot;Create properties&amp;quot; was reimplemented and added to the recent builds of SharpDevelop 4.2 (master branch).&lt;/p&gt;
&lt;p&gt;It can be reached by selecting &amp;quot;Create properties&amp;quot; from the refactoring main menu, or by typing propall and pressing tab in the editor (C# only):&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/siegfriedpammer/images/37513/original.aspx" border="0" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;It will insert a small dialog at the caret position:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/siegfriedpammer/images/37516/original.aspx" border="0" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;You can select all the fields you want to create properties for. As you can see there are some options, you can choose whether to generate the setter of a property. Additionally you can choose to implement INotifyPropertyChanged. It will implement the interface, if it has not been implemented yet, and will add an OnPropertyChanged method. A call to OnPropertyChanged will be inserted into each property setter:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/siegfriedpammer/images/37515/original.aspx" border="0" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I hope you like the return of this feature. Leave comments if you have any suggestions or problems!&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=37517" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/code+generation/default.aspx">code generation</category><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/SharpDevelop/default.aspx">SharpDevelop</category><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/4.2/default.aspx">4.2</category></item><item><title>"View in browser" context menu</title><link>http://community.sharpdevelop.net/blogs/marcueusebiu/archive/2011/10/09/quot-view-in-browser-quot-context-menu.aspx</link><pubDate>Sun, 09 Oct 2011 19:29:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:37338</guid><dc:creator>Eusebiu</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;Some time ago I&amp;#39;ve presented the support of IIS (local and Express) in SharpDevelop where one can set the web server options (Project Properties/Debug tab/Web server)&lt;/p&gt;
&lt;p&gt;Now, I&amp;#39;d like to present you a new context menu item called &amp;quot;View in browser&amp;quot;. When creating a web project (ASP.NET Web Forms / MVC) or a web service (ASP.NET WS, WCF - SOAP or REST), SharpDevelop will generate some basic files to get you started. Depending on the type of project, you will have some aspx, asmx, svc etc. files. The context menu for these types of files (&lt;span style="color:#0000ff;"&gt;aspx,asmx,html,htm,svc&lt;/span&gt;), will contain the new menu option:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/photos/marcueusebiu/images/37334/original.aspx" target="_blank"&gt;&lt;img src="http://community.sharpdevelop.net/photos/marcueusebiu/images/37334/original.aspx" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When executing this option, SharpDevelop will verify if the current project is a web project/service, create the virtual directory/application and start it in a browser (default port is set to 8080).&lt;/p&gt;
&lt;p&gt;If you have IIS Express installed, SharpDevelop will execute it for you also. As expected, debugging will work too.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/photos/marcueusebiu/images/37335/original.aspx" target="_blank"&gt;&lt;img src="http://community.sharpdevelop.net/photos/marcueusebiu/images/37335/original.aspx" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you want to edit/remove the registered websites in IISExpress, you will have to go to &amp;#39;&amp;#39;%userprofile%\documents\IISExpress\config\applicationhost.config&amp;quot; and edit/remove the &amp;quot;configuration/system.applicationHost/sites/site&amp;quot; element.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/photos/marcueusebiu/images/37336/original.aspx" target="_blank"&gt;&lt;img src="http://community.sharpdevelop.net/photos/marcueusebiu/images/37336/original.aspx" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;TODO list:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;port collision&lt;/li&gt;
&lt;li&gt;ASP.NET MVC&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;My test environment:&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Windows 7 Ultimate 32bit&lt;/li&gt;
&lt;li&gt;SharpDevelop 4.2 (master branch)&lt;/li&gt;
&lt;li&gt;IIS Express and IIS 7.5 (from Windows 7).&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;If you switch between IIS Express and&amp;nbsp;local&amp;nbsp;IIS, don&amp;#39;t forget to restart your computer, register ASP.NET (aspnet_regiis.exe /i) and restart IIS (iisreset).&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Happy coding!&amp;nbsp;&lt;/div&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=37338" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/marcueusebiu/archive/tags/IIS+Express/default.aspx">IIS Express</category><category domain="http://community.sharpdevelop.net/blogs/marcueusebiu/archive/tags/iis/default.aspx">iis</category><category domain="http://community.sharpdevelop.net/blogs/marcueusebiu/archive/tags/view+in+browser/default.aspx">view in browser</category></item><item><title>SubSonic T4 Templates</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2011/10/05/SubsonicT4Templates.aspx</link><pubDate>Wed, 05 Oct 2011 20:33:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:37301</guid><dc:creator>MattWard</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;a href="http://build.sharpdevelop.net/BuildArtefacts/"&gt;SharpDevelop 4.2&lt;/a&gt; now supports SubSonic T4 templates. 
    &lt;a href="http://subsonicproject.com/"&gt;Subsonic&lt;/a&gt; is an open 
    source 
    &lt;a href="http://en.wikipedia.org/wiki/Object-relational_mapping"&gt;
    object-relational mapper&lt;/a&gt; and makes use of T4 templates in all 
    but one of its supported methods to provide access to your data. 
    Before we take a look at what new T4 features were added to 
    SharpDevelop to support SubSonic let us see what you need to do to 
    get everything working.&lt;/p&gt;
&lt;h2&gt;Using SubSonic T4 Templates with SharpDevelop&lt;/h2&gt;
&lt;p&gt;In order to use the SubSonic T4 templates with SharpDevelop you 
    need to make two modifications to the Settings.ttimport file.&lt;/p&gt;
&lt;p&gt;Replace the EnvDTE assembly reference:&lt;/p&gt;
&lt;pre&gt;&amp;lt;#@ assembly name=&amp;quot;EnvDTE&amp;quot; #&amp;gt;&lt;/pre&gt;
&lt;p&gt;With the following:&lt;/p&gt;
&lt;pre&gt;&amp;lt;#@ assembly name=&amp;quot;$(addinpath:ICSharpCode.PackageManagement)PackageManagement.dll&amp;quot; #&amp;gt;&lt;/pre&gt;
&lt;p&gt;This references SharpDevelop&amp;#39;s NuGet addin assembly which 
    implements its own version of the Visual Studio object model.&lt;/p&gt;
&lt;p&gt;Add a new import directive as shown below:&lt;/p&gt;
&lt;pre&gt;&amp;lt;#@ import namespace=&amp;quot;EnvDTE = ICSharpCode.PackageManagement.EnvDTE&amp;quot; #&amp;gt;&lt;/pre&gt;
&lt;p&gt;This creates a namespace alias for EnvDTE so the references to 
    the Visual Studio object model in the SubSonic T4 template will 
    work.&lt;/p&gt;
&lt;p&gt;All that is left now is to save the changes made to the 
    Settings.ttimport file and generate the database access code by 
    executing the ActiveRecord.tt, Context.tt and Struct.tt T4 
    templates. This can be done by right clicking them in the Projects 
    window and selecting Execute Custom Tool.&lt;/p&gt;
&lt;p&gt;Now we will take a look at the new features that made this 
    possible.&lt;/p&gt;
&lt;h2&gt;Referencing SharpDevelop Properties and Environment Variables 
    in T4 Templates&lt;/h2&gt;
&lt;p&gt;The T4 assembly and include directives now support the 
    $(PropertyName) syntax to use SharpDevelop properties such as 
    SolutionDir and ProjectDir.&lt;/p&gt;
&lt;pre&gt;&amp;lt;#@ assembly name=&amp;quot;$(ProjectDir)lib\MyLibrary.dll&amp;quot; #&amp;gt; 
&amp;lt;#@ include file=&amp;quot;$(SolutionDir)Templates\MyTextTemplate.tt&amp;quot; #&amp;gt; &lt;/pre&gt;
&lt;p&gt;The assembly and include directives also support environment 
    variables through the %EnvironmentVariableName% syntax.&lt;/p&gt;
&lt;pre&gt;&amp;lt;#@ assembly name=&amp;quot;%ProgramFiles%\lib\MyLibrary.dll&amp;quot; #&amp;gt; 
&amp;lt;#@ include file=&amp;quot;%HOMEPATH%\MyTextTemplate.tt&amp;quot; #&amp;gt;&lt;/pre&gt;
&lt;p&gt;This new feature also supports the addinpath property and is 
    used to allow a T4 template to reference SharpDevelop&amp;#39;s NuGet 
    addin using the $(addinpath:AddIn-ID) syntax which is expanded to 
    the directory containing the addin.&lt;/p&gt;
&lt;h2&gt;Accessing the SharpDevelop IDE from a T4 Template&lt;/h2&gt;
&lt;p&gt;The SubSonic T4 templates use the Visual Studio object model to 
    find the project&amp;#39;s app.config file and read the database 
    connection string stored here in order to access your database. To 
    support this the T4 templating host in SharpDevelop now implements 
    the IServiceProvider interface which allows you to access 
    SharpDevelop&amp;#39;s implementation of the Visual Studio object 
    model.&lt;/p&gt;
&lt;p&gt;To access the Visual Studio object model you set the T4 template 
    so it is host specific:&lt;/p&gt;
&lt;pre&gt;&amp;lt;#@ template language=&amp;quot;C#&amp;quot; hostspecific=&amp;quot;true&amp;quot; #&amp;gt;&lt;/pre&gt;
&lt;p&gt;Then you can access the DTE object, which is the top-level 
    object of the Visual Studio object model, as shown below.&lt;/p&gt;
&lt;pre&gt;&amp;lt;#
    IServiceProvider provider = (IServiceProvider)Host; 
    EnvDTE.DTE dte = (EnvDTE.DTE)provider.GetService(typeof(EnvDTE.DTE));
#&amp;gt;&lt;/pre&gt;
&lt;p&gt;The Visual Studio object model is not fully implemented in 
    SharpDevelop so you may run into problems if you make extensive use 
    of this object model.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=37301" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/T4/default.aspx">T4</category></item><item><title>Tip No. 1: Ctrl+W</title><link>http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/2011/09/29/tip-no-1-ctrl-w.aspx</link><pubDate>Thu, 29 Sep 2011 18:00:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:37256</guid><dc:creator>siegi44</dc:creator><slash:comments>4</slash:comments><description>&lt;p&gt;Even as core developers of SharpDevelop we sometimes stumble across features in our own product, we did not know about before. Hence we decided to create a SharpDevelop Tips&amp;amp;Tricks section on our blog(s), to let you know all the cool features you can use to speed up your work. Today I want to start with something simple.&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Problem&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It often happens that you want to select of the code, whole methods or statements, or even (parts of) expressions. Of course you can do that by using the mouse or use Shift + the arrow keys, but it feels very clumsy and is inaccurate and error-prone.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Solution&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To avoid this a small hidden feature comes in very handy: Control + W. It is simple to use: Place the caret (the &amp;quot;keyboard cursor&amp;quot;) somewhere inside of a piece of code you want to select.&lt;br /&gt;&lt;br /&gt;Then hit Ctrl+W and the innermost expression, statement or member will be selected. Hit Ctrl+W again to extend the selection. You can repeat this as many times as you want; you will end up having selected the whole file.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://community.sharpdevelop.net/photos/siegfriedpammer/images/37257/original.aspx" border="0" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Remarks&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Imagine how this feature can be used in conjunction with other features like surround with (Ctrl+J) or extract method. In the future there could be a Introduce variable/constant refactoring, which extracts an expression into a variable/constant initializer.&lt;br /&gt;&lt;br /&gt;Quick note: currently it is not possible to undo or shrink the selection. Would you like to have something like that too? If so, which keyboard shortcut would you choose to make it easy to use?&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Update: Shrink selection was added as Ctrl+Shift+W in SharpDevelop 4.2 alpha builds. Thank you for your feedback.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Version Information&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This feature is available in SharpDevelop 4.0 and newer.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=37256" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/tags/SDTipsTricks/default.aspx">SDTipsTricks</category></item><item><title>Code Completion Trimming in SharpDevelop 4.2</title><link>http://community.sharpdevelop.net/blogs/christophwille/archive/2011/09/28/code-completion-trimming-in-sharpdevelop-4-2.aspx</link><pubDate>Wed, 28 Sep 2011 05:18:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:37236</guid><dc:creator>ChristophWille</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;As mentioned in the &lt;a href="http://community.sharpdevelop.net/forums/t/13869.aspx"&gt;release notes for SharpDevelop 4.1&lt;/a&gt;, it doesn&amp;#39;t display the correct code completion information if you have the .NET 4.5 preview bits on your machine too. Starting with revision 8111, SharpDevelop 4.2 now correctly trims the code completion to the target framework (available on the &lt;a href="http://build.sharpdevelop.net/BuildArtefacts/#SDMAIN"&gt;build server&lt;/a&gt;). Therefore, if you plan to work with 4.0 / 4.5 today, we recommend to switch to SharpDevelop 4.2.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=37236" width="1" height="1"&gt;</description></item></channel></rss>
