<?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>TypeScript Support in SharpDevelop</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2013/04/24/TypeScriptSupportInSharpDevelop.aspx</link><pubDate>Wed, 24 Apr 2013 21:00:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:46669</guid><dc:creator>MattWard</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;SharpDevelop 4.3.1 now has support for &lt;a href="http://www.typescriptlang.org/"&gt;TypeScript&lt;/a&gt; with an early beta release of a new &lt;a href="https://github.com/mrward/typescript-addin"&gt;Addin&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;The Addin glues together the TypeScript language services, which provide all the features needed for code completion and refactoring, and SharpDevelop using &lt;a href="http://javascriptdotnet.codeplex.com/"&gt;Javascript.NET&lt;/a&gt; as the bridge between them. Javascript.NET allows SharpDevelop to host Google&amp;#39;s V8 JavaScript engine and have JavaScript code interact with .NET objects.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript compilation on save or build.&lt;/li&gt;
&lt;li&gt;Code folding.&lt;/li&gt;
&lt;li&gt;Code completion&lt;/li&gt;
&lt;li&gt;Find references&lt;/li&gt;
&lt;li&gt;Rename refactoring&lt;/li&gt;
&lt;li&gt;Go to definition&lt;/li&gt;
&lt;li&gt;Quick class browser support.&lt;/li&gt;
&lt;li&gt;TypeScript syntax highlighting&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The addin supports:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SharpDevelop 4.3.1&lt;/li&gt;
&lt;li&gt;TypeScript 0.8.3.1&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let us take a quick look at some of these features.&lt;/p&gt;
&lt;h2&gt;Code Completion&lt;/h2&gt;
&lt;p&gt;Code completion works when you press the dot character.&lt;/p&gt;
&lt;p&gt;&lt;img alt="TypeScript dot code completion" src="http://community.sharpdevelop.net/photos/mattward/images/original/TypeScriptDotCodeCompletion.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;Code completion also works when you type the first bracket of a function.&lt;/p&gt;
&lt;p&gt;&lt;img alt="TypeScript function code completion" src="http://community.sharpdevelop.net/photos/mattward/images/original/TypeScriptFunctionCompletion.aspx" /&gt;&lt;/p&gt;
&lt;h2&gt;Find References, Go to Definition and Rename&lt;/h2&gt;
&lt;p&gt;These menu options can be found by right clicking on a class or a class member.&lt;/p&gt;
&lt;p&gt;&lt;img alt="TypeScript right click menu options" src="http://community.sharpdevelop.net/photos/mattward/images/original/TypeScriptTextEditorContextMenu.aspx" /&gt;&lt;/p&gt;
&lt;p&gt;Go To TypeScript Definition will show the corresponding type definition. Find TypeScript References will show the reference locations in the Output window. Rename will open a dialog box where you can type in the new name and click OK to have it updated everywhere it is referenced.&lt;/p&gt;
&lt;h2&gt;Getting the Addin&lt;/h2&gt;
&lt;p&gt;The addin&amp;#39;s &lt;a href="https://github.com/mrward/typescript-addin"&gt;source code&lt;/a&gt; is available on &lt;a href="https://github.com/mrward/typescript-addin"&gt;GitHub&lt;/a&gt;. A &lt;a href="http://community.sharpdevelop.net/blogs/mattward/TypeScript/TypeScriptAddin-0.1.zip"&gt;zip file is available to download&lt;/a&gt; containing the pre-compiled addin. Simply unzip the files and install into SharpDevelop using the Addin Manager. The Addin Manager is available by selecting Addin Manager from the Tools menu. Install the addin by clicking the Install Addin button and then restart SharpDevelop.&lt;/p&gt;
&lt;h2&gt;Configuring TypeScript Compiler Options&lt;/h2&gt;
&lt;p&gt;The compiler options are available from the Options dialog (Tools - Options) under the Text Editor category. Here you can change when the compiler is run and what options are passed to the compiler when generating JavaScript code.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Configuring TypeScript Compiler Options" src="http://community.sharpdevelop.net/photos/mattward/images/original/TypeScriptCompilerOptionsDialog.aspx" /&gt;&lt;/p&gt;
&lt;h2&gt;Limitations and Known Issues&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Limitation with multiple projects using TypeScript files in the same solution. All files are included in the same scope.&lt;/li&gt;
&lt;li&gt;Performance problems - currently doing work on the UI thread and also re-parsing all TypeScript files each time when a code completion action is triggered.&lt;/li&gt;
&lt;li&gt;Different behaviour to Visual Studio with classes show in the code completion window. Visual Studio only shows code completion for TypeScript files you have explicitly referenced in a comment. SharpDevelop shows everything in the current project.&lt;/li&gt;
&lt;li&gt;Unable to easily replace the existing SharpDevelop menu options such as Find References so the standard shortcuts will not work.&lt;/li&gt;
&lt;li&gt;No support for hovering over a type with the mouse and seeing a tooltip with information about the type.&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=46669" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/TypeScript/default.aspx">TypeScript</category></item><item><title>SharpDevelop 4.3.1: A Little Support for Markdown</title><link>http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/2013/03/31/sharpdevelop-4-3-1-a-little-support-for-markdown.aspx</link><pubDate>Sun, 31 Mar 2013 08:19:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:45499</guid><dc:creator>siegi44</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The Markdown syntax for formatting text recently gained more and more visibility and is used especially on StackExchange, GitHub and so on. Hence we added simple highlighting support for Markdown.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s an example of what it currently looks like in SharpDevelop:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/blogs/siegfried_pammer/blogpost_markdown.PNG"&gt;&lt;img src="http://community.sharpdevelop.net/blogs/siegfried_pammer/blogpost_markdown.PNG" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you can see, it is far from complete, but it is a good start.&lt;/p&gt;
&lt;p&gt;If you have a weekend to spare and want to help out, you could help us with one of&amp;nbsp;the following features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Code completion&lt;/li&gt;
&lt;li&gt;Folding&lt;/li&gt;
&lt;li&gt;Extended highlighting&lt;/li&gt;
&lt;li&gt;Live preview view content&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;(We won&amp;#39;t do those any time soon, because there are more important things to be done in SharpDevelop 5)&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=45499" 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.3/default.aspx">4.3</category></item><item><title>SharpDevelop 5 C# Tech Preview</title><link>http://community.sharpdevelop.net/blogs/christophwille/archive/2013/02/13/sharpdevelop-5-c-tech-preview.aspx</link><pubDate>Wed, 13 Feb 2013 10:33:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:45200</guid><dc:creator>ChristophWille</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;
SharpDevelop 5 has been long in the making, with the bulk of the time being spent on the move to NRefactory 5
(&lt;a href="http://community.sharpdevelop.net/blogs/danielgrunwald/archive/2012/08/11/nrefactory-5-article.aspx"&gt;more information&lt;/a&gt;).
Today we finally have something to show - a C#-only tech preview of SharpDevelop 5. It is not polished, but it will give you an idea 
what cool things are now possible - code actions being the poster child of the new features coming. 
&lt;/p&gt;
&lt;h2&gt;Download&lt;/h2&gt;
&lt;p&gt;
&lt;a href="http://sourceforge.net/projects/sharpdevelop/files/SharpDevelop%205.x/CSharp%20Tech%20Preview/SharpDevelop_5.0.0.2100_CSharpTechPreview_Setup.msi/download"&gt;Build 2100 Setup&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://sourceforge.net/projects/sharpdevelop/files/SharpDevelop%205.x/CSharp%20Tech%20Preview/SharpDevelop_5.0.0.2100_CSharpTechPreview_Source.zip/download"&gt;Build 2100 Source Code&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Newer versions can be downloaded from the &lt;a href="http://build.sharpdevelop.net/BuildArtefacts/"&gt;build server&lt;/a&gt;, expect more activity once
SharpDevelop 4.3 has shipped.
&lt;/p&gt;
&lt;h2&gt;Features entirely not available&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Languages other than C# (VB.NET, IronPython, IronRuby)
&lt;/li&gt;
&lt;li&gt;Windows Forms designer
&lt;/li&gt;
&lt;li&gt;XAML code completion
&lt;/li&gt;
&lt;li&gt;Profiler
&lt;/li&gt;
&lt;li&gt;Reporting (SharpDevelop Reports)
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Features with restricted functionality&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;NuGet: PowerShell is not yet available (console and PS scripts on install of a package).
&lt;/li&gt;
&lt;li&gt;WiX: dialog designer is not yet available.
&lt;/li&gt;
&lt;li&gt;ASP.NET MVC: Code completion and folding currently disabled for Razor and Web Forms (.aspx) files.
&lt;/li&gt;
&lt;li&gt;Debugger: The object graph visualizer doesn&amp;#39;t support collections yet; performance issues for larger collections.
&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=45200" width="1" height="1"&gt;</description></item><item><title>NuGet Addin for MonoDevelop</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2013/01/07/MonoDevelopNuGetAddin.aspx</link><pubDate>Mon, 07 Jan 2013 18:41:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:44955</guid><dc:creator>MattWard</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;It has been a while since &lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2011/01/23/NuGetSupportInSharpDevelop.aspx"&gt;NuGet support was added to SharpDevelop&lt;/a&gt; so, after David Fowler announced that he had got &lt;a href="https://twitter.com/davidfowl/status/276188287721414656"&gt;NuGet building under Mono&lt;/a&gt;, I had a look at porting the SharpDevelop addin over to &lt;a href="http://monodevelop.com"&gt;MonoDevelop&lt;/a&gt; and created a &lt;a href="https://github.com/mrward/monodevelop-nuget-addin"&gt;NuGet addin for MonoDevelop&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://github.com/mrward/monodevelop-nuget-addin"&gt;addin&lt;/a&gt; provides a &lt;strong&gt;Manage Packages dialog&lt;/strong&gt; that you can use to add, remove and update NuGet packages in a similar way to Visual Studio or SharpDevelop. Here is a screenshot of the &lt;strong&gt;Manage Packages dialog&lt;/strong&gt; open in MonoDevelop running on OpenSuse 12.2&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/ManagePackagesDialog.aspx" alt="Manage Packages Dialog with package operation messages" /&gt;&lt;/p&gt;
&lt;p&gt;The addin has been tested with the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MonoDevelop 3.0.5&lt;/li&gt;
&lt;li&gt;Mono 2.10.9&lt;/li&gt;
&lt;li&gt;OpenSuse 12.2&lt;/li&gt;
&lt;li&gt;Windows 7&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The addin uses a &lt;a href="https://github.com/mrward/nuget/tree/monodevelop"&gt;slightly customised version of NuGet.Core&lt;/a&gt; based on the original &lt;a href="http://nuget.codeplex.com/SourceControl/BrowseLatest"&gt;NuGet&amp;#39;s source code&lt;/a&gt; available from the mono-build branch. The source code for this customised NuGet.Core is available on &lt;a href="https://github.com/mrward/nuget/tree/monodevelop"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Getting the Addin&lt;/h2&gt;
&lt;p&gt;The addin&amp;#39;s &lt;a href="https://github.com/mrward/monodevelop-nuget-addin"&gt;source code&lt;/a&gt; is available on &lt;a href="https://github.com/mrward/monodevelop-nuget-addin"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The addin is also provided as a pre-compiled binary available to download from a custom MonoDevelop repository:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mrward.github.com/monodevelop-nuget-addin-repository/3.0.5/main.mrep"&gt;http://mrward.github.com/monodevelop-nuget-addin-repository/3.0.5/main.mrep&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can add this repository to MonoDevelop via the &lt;a href="http://monodevelop.com/Documentation/Installing_Add-ins"&gt;Add-in Manager&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Please note that the addin is a beta release and more work is still to be done.&lt;/p&gt;
&lt;h2&gt;Manage Packages Dialog&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;Manage Packages Dialog&lt;/strong&gt; can be opened from the &lt;strong&gt;Projects&lt;/strong&gt; menu by selecting &lt;strong&gt;Manage NuGet Packages&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;It can also be opened by selecting the &lt;strong&gt;Solution&lt;/strong&gt; window, right clicking either the solution, the project or the project&amp;#39;s references and selecting &lt;strong&gt;Manage NuGet Packages&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;As a NuGet package is installed or uninstalled you can see the package operations that executed by expanding the &lt;strong&gt;Messages&lt;/strong&gt; section near the bottom of the dialog.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/ManagePackagesDialogWithMessages.aspx" alt="Manage Packages Dialog with package operation messages" /&gt;&lt;/p&gt;
&lt;h2&gt;Configuring Package Sources&lt;/h2&gt;
&lt;p&gt;NuGet Package Sources can be configured in MonoDevelop&amp;#39;s options.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/NuGetPackageSourcesOptionsDialog.aspx" alt="Configuring NuGet Package Sources in MonoDevelop&amp;#39;s Options" /&gt;&lt;/p&gt;
&lt;p&gt;In Linux you can open the options dialog by selecting &lt;strong&gt;Preferences&lt;/strong&gt; from the &lt;strong&gt;Edit&lt;/strong&gt; menu. In Windows you can select &lt;strong&gt;Options&lt;/strong&gt; from the &lt;strong&gt;Tools&lt;/strong&gt; menu. In the Options dialog scroll down the categories on the left hand side until you find &lt;strong&gt;NuGet&lt;/strong&gt; and then select &lt;strong&gt;Package Sources&lt;/strong&gt;. Here you can add and remove NuGet package sources.&lt;/p&gt;
&lt;h2&gt;PowerShell&lt;/h2&gt;
&lt;p&gt;Any PowerShell scripts in a NuGet package will be ignored by the addin since Mono does not currently have support for them.&lt;/p&gt;
&lt;p&gt;There have been some attempts to implement PowerShell on Mono starting with Igor Moochnick who created &lt;a href="http://pash.sourceforge.net"&gt;Pash&lt;/a&gt; in 2008. Work on this was picked up &lt;a href="https://launchpad.net/pash"&gt;launchpad.net&lt;/a&gt; by Jonathan Ben-Joseph but that work stopped. The latest effort on bringing PowerShell to Mono is Jay Bazuzi with recent work done on the Pash source code available on &lt;a href="https://github.com/JayBazuzi/Pash2"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://pash.sourceforge.net"&gt;Pash on SourceForge&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://launchpad.net/pash"&gt;Pash on LaunchPad&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/JayBazuzi/Pash2"&gt;Pash2 on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There was also some &lt;a href="http://nuget.codeplex.com/discussions/246658"&gt;discussion in the NuGet forums&lt;/a&gt; on allowing some way of being able to write a &lt;a href="http://nuget.codeplex.com/workitem/720"&gt;.NET version of the PowerShell scripts&lt;/a&gt; (install.ps1, uninstall.ps1 and init.ps1).&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=44955" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/Mono/default.aspx">Mono</category><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/NuGet/default.aspx">NuGet</category><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/MonoDevelop/default.aspx">MonoDevelop</category></item><item><title>Progress of XML Forms Conversion in SharpDevelop 4.3</title><link>http://community.sharpdevelop.net/blogs/sharpdevelopreports/archive/2012/12/31/progress-of-xml-forms-conversion-in-sharpdevelop-4-3.aspx</link><pubDate>Mon, 31 Dec 2012 12:14:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:44905</guid><dc:creator>cssdadmin</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;One of the goals for SharpDevelop 5 is to convert legacy XML Forms (xfrms) to WPF, and drop support for XML Forms entirely. Now, you might be asking &amp;quot;Did I miss a Microsoft UI technology?&amp;quot; No, you didn&amp;#39;t. XML Forms is a SharpDevelop-internal mechanism for declarative form design (for Windows Forms)&amp;nbsp;that predates WPF by a couple of years - and it shows its age especially when it comes to more design-centric issues (I already mentioned: it is Windows Forms).&lt;/p&gt;
&lt;p&gt;To have some of the benefits today, I started the conversion on SharpDevelop 4.3 (it will also be easier to merge between the branches this way). In order for you to know where those conversions happened - and why some behavior might have changed (bugs: please let us know!) - this blog post shows a full list of the changed addin and panels.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fully Converted Addins&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Any and all forms in those addins have been converted:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CppBinding&lt;/li&gt;
&lt;li&gt;CSharpBinding&lt;/li&gt;
&lt;li&gt;VBNetBinding&lt;/li&gt;
&lt;li&gt;ICSharpCode.CodeAnalysis (FxCop)&lt;/li&gt;
&lt;li&gt;ICSharpCode.SourceAnalysis - (MattEverson.SourceAnalysis) (StyleCop)&lt;/li&gt;
&lt;li&gt;ICSharpCode.CodeCoverage&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Converted Option Panels (Options Dialog)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The panels have been converted, and they now derive from ICSharpCode.SharpDevelop.Gui.OptionPanels.ProjectOptionPanel (important for those of you interested in building new addins):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CSharpBinding.OptionPanels.BuildOptions&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Gui.OptionPanels.BuildEvents&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Gui.OptionPanels.Signing&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Gui.OptionPanels.ReferencePaths&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Gui.OptionPanels.ApplicationSettings&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Gui.OptionPanels.DebugOptions&lt;/li&gt;
&lt;li&gt;ICSharpCode.CppBinding.Project.ApplicationOptions&lt;/li&gt;
&lt;li&gt;ICSharpCode.CppBinding.Project.PreprocessorOptions&lt;/li&gt;
&lt;li&gt;ICSharpCode.CppBinding.Project.LinkerOptions&lt;/li&gt;
&lt;li&gt;ICSharpCode.VBNetBinding.OptionPanels.ProjectImports&lt;/li&gt;
&lt;li&gt;ICSharpCode.VBNetBinding.OptionPanels.BuildOptions&lt;/li&gt;
&lt;li&gt;ICSharpCode.AspNet.Mvc.WebProjectOptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.SourceAnalysis.AnalysisProjectOptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.CodeAnalysis.AnalysisProjectOptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.CodeCoverage.CodeCoverageProjectOptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Gui.OptionPanels.ServiceReference.ServiceReferenceOptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Gui.OptionPanels.ProjectCustomToolOptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Gui.OptionPanels.TaskListXaml&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Gui.OptionPanels.SelectStylePanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Gui.OptionPanels.SelectCulturePanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Gui.OptionPanels.ProjectAndSolutionOptions&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Gui.OptionPanels.LoadSaveOptions&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Gui.OptionPanels.EditStandardHeaderPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Gui.OptionPanels.CodeGenerationPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Gui.OptionPanels.ExternalToolPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.SharpDevelop.Editor.CodeCompletion.CodeCompletionPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.Profiler.AddIn.OptionPanels.General&lt;/li&gt;
&lt;li&gt;CSharpCode.PythonBinding.PythonOptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.XamlBinding.Options.CodeCompletion&lt;/li&gt;
&lt;li&gt;Debugger.AddIn.Options.DebuggingOptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.PackageManagement.RegisteredProjectTemplatePackageSourcesView&lt;/li&gt;
&lt;li&gt;ICSharpCode.PackageManagement.PackageManagementOptionsView&lt;/li&gt;
&lt;li&gt;MSHelpSystem.Help3OptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.UsageDataCollector.OptionPage&lt;/li&gt;
&lt;li&gt;ICSharpCode.FormsDesigner.Gui.OptionPanels.LocalizationModelOptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.FormsDesigner.Gui.OptionPanels.GridOptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.FormsDesigner.Gui.OptionPanels.GeneralOptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.XmlEditor.XmlEditorOptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.AvalonEdit.AddIn.Options.TextViewOptions&lt;/li&gt;
&lt;li&gt;ICSharpCode.AvalonEdit.AddIn.Options.HighlightingOptions&lt;/li&gt;
&lt;li&gt;ICSharpCode.AvalonEdit.AddIn.Options.GeneralEditorOptions&lt;/li&gt;
&lt;li&gt;ICSharpCode.AvalonEdit.AddIn.Options.BehaviorOptions&lt;/li&gt;
&lt;li&gt;HexEditor.View.HexEditOptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.CodeAnalysis.AnalysisIdeOptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.CodeCoverage.CodeCoverageOptionsPanel&lt;/li&gt;
&lt;li&gt;ICSharpCode.SourceAnalysis.AnalysisIdeOptionsPanel&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The work for 4.3 in this area is now done, the conversion will be completed in SharpDevelop 5.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=44905" width="1" height="1"&gt;</description></item><item><title>Code First Migrations with Entity Framework</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2012/11/11/CodeFirstMigrationsWithEntityFramework.aspx</link><pubDate>Sun, 11 Nov 2012 17:00:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:44701</guid><dc:creator>MattWard</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;SharpDevelop 4.3 now has support for Code First Migrations using Entity Framework 5.0.&lt;/p&gt;
&lt;p&gt;Microsoft added &lt;a href="http://msdn.microsoft.com/en-us/data/jj591621"&gt;Code First Migrations&lt;/a&gt; to Entity Framework in version 4.3 in February 2012. Code first migrations allows database changes to be implemented with code. The official Entity Framework NuGet package includes three  PowerShell cmdlets that extend the NuGet Package Manager Console allowing you to quickly create and use these code first migrations:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Enable-Migrations: Adds support for migrations to your project.&lt;/li&gt;
&lt;li&gt;Add-Migration: Generates code for a database migration based on changes to your database model.&lt;/li&gt;
&lt;li&gt;Update-Database: Applies migrations to the database.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The PowerShell cmdlets in the official EntityFramework NuGet packages are Visual Studio specific, but there is now a SharpDevelop specific NuGet package (EntityFramework.SharpDevelop) that allows you to use these PowerShell cmdlets in SharpDevelop. This has been made possible by &lt;a href="http://msdn.microsoft.com/en-US/data/ef"&gt;Entity Framework&lt;/a&gt; being &lt;a href="http://entityframework.codeplex.com/"&gt;open sourced&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The EntityFramework.SharpDevelop NuGet package includes the original EntityFramework.dll along with custom versions of the assemblies containing the PowerShell cmdlets -  EntityFramework.PowerShell.dll and EntityFramework.PowerShell.Utility.dll.&lt;/p&gt;
&lt;p&gt;Now let us take a look at how to use the EntityFramework.SharpDevelop NuGet package.&lt;/p&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;Before you begin you should have &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=1695"&gt;SQL Express&lt;/a&gt; installed. You will also need &lt;a href="http://build.sharpdevelop.net/buildartefacts/"&gt;SharpDevelop version 4.3.0.9134&lt;/a&gt; or above.&lt;/p&gt;
&lt;p&gt;We will look at using Entity Framework with a simple C# console application. This application will add a blog post to a SQL Express database and then read all the existing blog posts in the database. &lt;/p&gt;
&lt;p&gt;In SharpDevelop first create a new C# Console Application. Now open the NuGet Manage Packages dialog by right clicking the project and selecting Manage Packages. Search for the EntityFramework.SharpDevelop package in the main NuGet feed and click the Add button to add it to your project. A reference to the EntityFramework assembly will be added to your project and your app.config will be modified. &lt;/p&gt;
&lt;p&gt;Now we are ready to use Entity Framework to update and read from our database.&lt;/p&gt;
&lt;h2&gt;Using Entity Framework&lt;/h2&gt;
&lt;p&gt;First add a new Post class to your project.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class Post
{
    public int Id { get; set; }
    public string Title { get; set; }
    public string Text { get; set; }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now add a new database context class.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class BloggingContext : DbContext
{
    public DbSet&amp;lt;Post&amp;gt; Posts { get; set; }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You will also need to add a using statement to the BloggingContext class so the EntityFramework&amp;#39;s DbContext class can be found.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    using System.Data.Entity;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now open your Program.cs and add a using statement for System.Linq.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    using System.Linq;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then in Program.cs update the Main method as shown below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;class Program
{
    public static void Main(string[] args)
    {
        Console.Write(&amp;quot;Enter a post title: &amp;quot;);
        string title = Console.ReadLine();

        Console.Write(&amp;quot;Enter the post text: &amp;quot;);
        string text = Console.ReadLine();

        using (var db = new BloggingContext()) {

            var newPost = new Post {
                Title = title,
                Text = text
            };

            db.Posts.Add(newPost);
            db.SaveChanges();

            Console.WriteLine(&amp;quot;All posts in the database:&amp;quot;);

            IQueryable&amp;lt;Post&amp;gt; query = db.Posts
                .OrderBy(p =&amp;gt; p.Title)
                .Select(p =&amp;gt; p);

            foreach (Post post in query) {
                Console.WriteLine(&amp;quot;Post.Title: &amp;quot; + post.Title);
            }
        }

        Console.WriteLine(&amp;quot;Press a key to exit.&amp;quot;);
        Console.ReadKey();
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This code reads the blog post title and text entered on the command line, adds a new post to the database and then reads all the posts in the database. Compile and run this application and you should see output similar to the following.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    Enter a post title: First Post
    Enter the post text: Some text here...
    All posts in the database:
    Post.Title: First Post
    Press a key to exit.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After running this application Entity Framework will have created a new database with the same name as the db context class you created. In the screenshot below you can see the database open in &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=22985"&gt;SQL Server Express Management Studio&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/CodeFirstDatabaseCreatedByEntityFramework.aspx" alt="Code first database created by Entity Framework" /&gt;&lt;/p&gt;
&lt;p&gt;You can see that Entity Framework has created a Posts table as well as a __MigrationHistory table. Now we will take a look at enabling database migrations.&lt;/p&gt;
&lt;h2&gt;Enabling Migrations&lt;/h2&gt;
&lt;p&gt;Open the Package Management Console and enter the command.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    Enable-Migrations
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This adds a Migrations folder to your project along with a Configuration.cs file and an initial migration.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/ProjectItemsAfterCodeFirstMigrationsEnabled.aspx" alt="Project items after migrations are enabled" /&gt;&lt;/p&gt;
&lt;p&gt;The Configuration.cs file can be edited to add seed data and alter other settings used when migrating the database. The initial migration files contain code to generate the Posts table in the database.&lt;/p&gt;
&lt;p&gt;Now let us take a look at adding a new migration.&lt;/p&gt;
&lt;h2&gt;Adding a Migration&lt;/h2&gt;
&lt;p&gt;We want to add a Published Date to our Post class. Add the new PublishedDate property to the Post class as shown below.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class Post
{
    public int Id { get; set; }
    public string Title { get; set; }
    public string Text { get; set; }
    public DateTime PublishedDate { get; set; }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can generate a code first migration by entering the following command into the Package Management Console.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    Add-Migration AddPublishedDate
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This creates a new migration and gives it the name AddPublishedDate. A new file will be added to your migrations folder which contains the code to update the Posts table with the new PublishedDate column.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;namespace EFCodeFirst.Migrations
{
    using System;
    using System.Data.Entity.Migrations;

    public partial class AddPublishedDate : DbMigration
    {
        public override void Up()
        {
            AddColumn(&amp;quot;dbo.Posts&amp;quot;, &amp;quot;PublishedDate&amp;quot;, c =&amp;gt; c.DateTime(nullable: false));
        }

        public override void Down()
        {
            DropColumn(&amp;quot;dbo.Posts&amp;quot;, &amp;quot;PublishedDate&amp;quot;);
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now you can update your database.&lt;/p&gt;
&lt;h2&gt;Updating the Database&lt;/h2&gt;
&lt;p&gt;To update the database we run the following command in the Package Management Console window.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    Update-Database
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The new PublishedDate column will then be added to the Posts database table as shown in the screenshot below&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/PostsTableAfterCodeFirstMigrationApplied.aspx" alt="Posts table after code first migration applied" /&gt;&lt;/p&gt;
&lt;p&gt;That concludes the introduction to using Code First Migrations with SharpDevelop. More information on EntityFramework can be found on the &lt;a href="http://msdn.microsoft.com/data/ef"&gt;Microsoft MSDN site&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Changes Made to Original Entity Framework NuGet Packages&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Renamed NuGet package to EntityFramework.SharpDevelop and included files and assemblies from official EF NuGet package.&lt;/li&gt;
&lt;li&gt;Recompiled the EntityFramework.PowerShell and EntityFramework.PowerShell.Utility projects against SharpDevelop&amp;#39;s EnvDTE implementation.&lt;/li&gt;
&lt;li&gt;Small modifications to the project to compile against .NET 4.0 and the EntityFramework.dll. Microsoft&amp;#39;s released source code on Codeplex is for EntityFramework 6 and not for EF 5.&lt;/li&gt;
&lt;li&gt;EntityFramework.PowerShell and EntityFramework.PowerShell.Utility assemblies are no longer signed.&lt;/li&gt;
&lt;li&gt;Added workaround to fix AppDomain.CreateInstance failing to find constructors taking a EnvDTE.Project parameter.&lt;/li&gt;
&lt;li&gt;Add SharpDevelop.EnvDTE.dll to NuGet packages.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All the code for the modified NuGet packages are available on &lt;a href="https://github.com/mrward/entityframework-sharpdevelop/tree/ef5-nuget"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=44701" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/EF/default.aspx">EF</category></item><item><title>MVC Scaffolding</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2012/09/28/MvcScaffolding.aspx</link><pubDate>Fri, 28 Sep 2012 13:10:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:44455</guid><dc:creator>MattWard</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;SharpDevelop 4.3 now has support for &lt;a href="http://mvcscaffolding.codeplex.com"&gt;MVC Scaffolding&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mvcscaffolding.codeplex.com/"&gt;MVC Scaffolding&lt;/a&gt;, maintained by &lt;a href="http://blog.stevensanderson.com"&gt;Steve Sanderson&lt;/a&gt;, provides a way to quickly generate code for views and controllers in your ASP.NET MVC application. It has support for scaffolding the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Views and controllers.&lt;/li&gt;
&lt;li&gt;Entity Framework DbContexts.&lt;/li&gt;
&lt;li&gt;Repositories.&lt;/li&gt;
&lt;li&gt;Controller actions.&lt;/li&gt;
&lt;li&gt;Unit tests.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It makes use of T4 templates, which can be customised, and can be extended with custom scaffolders to support more than just the features listed above.&lt;/p&gt;
&lt;p&gt;The original MVC Scaffolding NuGet packages made heavy use of the Visual Studio API and have been modified to work with SharpDevelop. Full details of the changes made to the original NuGet packages can be found at the end of this post.&lt;/p&gt;
&lt;p&gt;Steve Sanderson has a &lt;a href="http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/"&gt;great series of posts on MVC Scaffolding&lt;/a&gt; that covers more than this post will. Now let us take a look at how to use MVC Scaffolding with SharpDevelop.&lt;/p&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;MVC Scaffolding for SharpDevelop is available as a &lt;a href="http://nuget.org/packages/MvcScaffolding.SharpDevelop"&gt;NuGet package&lt;/a&gt;. The NuGet package you should download is &lt;strong&gt;MvcScaffolding.SharpDevelop&lt;/strong&gt;. Install the MvcScaffolding.SharpDevelop NuGet package either from the NuGet package management console or by using the Manage Packages dialog.&lt;/p&gt;
&lt;p&gt;Note that the NuGet package MvcScaffolding.SharpDevelop.1.0.9 requires SharpDevelop 4.3.0.9134 or above. If you have an older version installed then you should uninstall the MvcScaffolding.SharpDevelop package, before installing the latest version of SharpDevelop, and then reinstall the MvcScaffolding.SharpDevelop package. A breaking change made to SharpDevelop 4.3 to support the EntityFramework package will cause the older MvcScaffolding.SharpDevelop NuGet package to fail to uninstall cleanly in the newer version of SharpDevelop.&lt;/p&gt;
&lt;h2&gt;Scaffolding a Controller and Views&lt;/h2&gt;
&lt;p&gt;As an example we will create a simple blogging site. Create a Razor MVC application called BloggingSite. Then create the following class in a Models folder.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;using System;

namespace BloggingSite.Models
{
    public class Post
    {
        public int Id { get; set; }
        public string Title { get; set; }
        public string Text { get; set; }
        public DateTime PublishedDate { get; set; }
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now we can scaffold a controller and a set of Create, Read, Update and Delete (CRUD) views. In the Package Management console run the following command.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Scaffold Controller Post
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will generate a set of views, a controller and an Entity Framework database context.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/PackageManagementConsoleOutputForScaffoldControllerPost.aspx" alt="Scaffold Controller Post output in Package Management Console" /&gt;&lt;/p&gt;
&lt;p&gt;To run the Blogging Site application you will need to have IIS Express and SQL Server Express installed. Your project will also need to be configured to use IIS Express. Select &lt;strong&gt;Project Options&lt;/strong&gt; from the &lt;strong&gt;Project&lt;/strong&gt; menu and then select the &lt;strong&gt;Web&lt;/strong&gt; tab. Choose IIS Express and then click the &lt;strong&gt;Create application/virtual directory&lt;/strong&gt; button.&lt;/p&gt;
&lt;p&gt;Then run your application and visit the &lt;strong&gt;/Posts&lt;/strong&gt; page in your browser.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/ScaffoldedPostsPageWithEmptyDatabase.aspx" alt="Scaffolded Posts page with empty database" /&gt;&lt;/p&gt;
&lt;p&gt;You can then create a new post by clicking the &lt;strong&gt;Create New&lt;/strong&gt; link.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/ScaffoldedPostsCreateNewPostPage.aspx" alt="Creating new blog post page" /&gt;&lt;/p&gt;
&lt;p&gt;After creating a new post then the post will be displayed on the original /Posts page.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/ScaffoldedPostsPageWithOnePost.aspx" alt="Scaffolded Posts page with one post" /&gt;&lt;/p&gt;
&lt;p&gt;Also scaffolded is the details page which you can view by clicking the &lt;strong&gt;Details&lt;/strong&gt; link.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/ScaffoldedPostsDetailsPage.aspx" alt="Scaffolded Details page" /&gt;&lt;/p&gt;
&lt;p&gt;Finally there is the Delete page where you can remove a post.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/ScaffoldedPostsDeletePage.aspx" alt="Scaffolded delete post page" /&gt;&lt;/p&gt;
&lt;p&gt;Scaffolding CRUD views is just one part of MvcScaffolding so let us take a look at some of other scaffolding that is supported. Steve Sanderson goes into more detail on &lt;a href="http://blog.stevensanderson.com/2011/01/13/mvcscaffolding-standard-usage/"&gt;what you can do with each of the MVC Scaffolders&lt;/a&gt; than will be covered here.&lt;/p&gt;
&lt;h2&gt;Scaffolding a Repository&lt;/h2&gt;
&lt;p&gt;The PostsController generated uses the BloggingSiteContext class which is derived from Entity Framework&amp;#39;s DbContext. &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class PostsController : Controller
{
    private BloggingSiteContext context = new BloggingSiteContext();

    //
    // GET: /Posts/

    public ViewResult Index()
    {
        return View(context.Posts.ToList());
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To allow unit testing of the controller we can instead using a repository interface which can be mocked. To do that we run the following command.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Scaffold Controller Post -Repository -Force
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;By default MVC Scaffolding will not overwrite views and controllers previously created in your project. In order to overwrite the views and controllers created previously we use the &lt;strong&gt;-Force&lt;/strong&gt; option.&lt;/p&gt;
&lt;p&gt;The PostsController now looks like this.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class PostsController : Controller
{
    private readonly IPostRepository postRepository;

    // If you are using Dependency Injection, you can delete the following constructor
    public PostsController() : this(new PostRepository())
    {
    }

    public PostsController(IPostRepository postRepository)
    {
        this.postRepository = postRepository;
    }

    //
    // GET: /Posts/

    public ViewResult Index()
    {
        return View(postRepository.All);
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Scaffolding an Empty View&lt;/h2&gt;
&lt;p&gt;You can scaffold an empty view by using the &lt;strong&gt;View&lt;/strong&gt; scaffolder and specifying the name of the controller, without the Controller part, followed by the name of the view.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Scaffold View Posts MyEmptyView
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In a Razor MVC application this will generate the file Views\Posts\MyEmptyView.cshtml in your project.&lt;/p&gt;
&lt;h2&gt;Scaffolding Database Context&lt;/h2&gt;
&lt;p&gt;You can scaffold extra properties for your database context by using the &lt;strong&gt;DbContext&lt;/strong&gt; scaffolder and specifying the model class and the name of the database context class. Create a new Blog class, as shown below.&lt;/p&gt;
&lt;p&gt;using System;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;using System;

namespace BloggingSite.Models
{
    public class Blog
    {
        public int Id { get; set; }
        public string Name { get; set; }
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now run the command below to update your database context and a new Blogs property will be added to your BloggingSiteContext class.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Scaffold DbContext Blog BloggingSiteContext
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The new BloggingSiteContext class is shown below.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class BloggingSiteContext : DbContext
{
    // You can add custom code to this file. Changes will not be overwritten.
    // 
    // If you want Entity Framework to drop and regenerate your database
    // automatically whenever you change your model schema, add the following
    // code to the Application_Start method in your Global.asax file.
    // Note: this will destroy and re-create your database with every model change.
    // 
    // System.Data.Entity.Database.SetInitializer(
        new System.Data.Entity.DropCreateDatabaseIfModelChanges
            &amp;lt;BloggingSite.Models.BloggingSiteContext&amp;gt;());


    public DbSet&amp;lt;BloggingSite.Models.Post&amp;gt; Posts { get; set; }

    public DbSet&amp;lt;BloggingSite.Models.Blog&amp;gt; Blogs { get; set; }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Scaffolding Controller Actions&lt;/h2&gt;
&lt;p&gt;You can scaffold new controller actions by using the &lt;strong&gt;Action&lt;/strong&gt; scaffolder and specifying the name of the controller, without the Controller part, and the name of the new action method.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Scaffold Action Posts MyAction
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will add a new MyAction method at the end of your PostsController class.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public ViewResult MyAction()
{
    return View();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It will also create an associated view.&lt;/p&gt;
&lt;p&gt;You can also scaffold actions that can have data posted to them. If you run the following command a new action will be created that takes a posted Blog object.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Scaffold Action Posts MyPostAction -ViewModel Blog -Post
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The PostsController will now have a new MyPostAction method at the end.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[HttpPost, ActionName(&amp;quot;MyPostAction&amp;quot;)]
public ActionResult MyPostActionPost(Blog blog)
{
    if (ModelState.IsValid) {
        return RedirectToAction(&amp;quot;Index&amp;quot;);
    } else {
        return View(blog);
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That is the end of our introduction to using MVC Scaffolding with SharpDevelop.&lt;/p&gt;
&lt;h2&gt;Modifications Made to Original MVC Scaffolding&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Mvc Scaffolding projects now compiled against SharpDevelop&amp;#39;s Package Management assembly which implements the Visual Studio API.&lt;/li&gt;
&lt;li&gt;T4 template generation now uses &lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2011/06/26/T4TemplatesInSharpDevelop.aspx"&gt;MonoDevelop&amp;#39;s T4 Templating Engine&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;T4Scaffolding.SharpDevelop.1.0.8 NuGet package depends on EntityFramework.SharpDevelop NuGet package instead of the original EntityFramework NuGet package This allows an upgrade to the NuGet package EntityFramework.SharpDevelop.5.0.0 which supports migrations in SharpDevelop.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Source code for the modified MVC Scaffolding can be found on &lt;a href="http://mvcscaffolding.codeplex.com/SourceControl/network/forks/MattWard/mvcscaffolding"&gt;CodePlex&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[Update 2012-11-10]&lt;/strong&gt; Added information on MvcScaffolding.SharpDevelop 1.0.9 NuGet package requiring newer version of SharpDevelop. Updated &amp;quot;Scaffolding Database Context&amp;quot; section with example Blog class. Updated &amp;quot;Modifications Made to Original MVC Scaffolding&amp;quot; section with change made to T4Scaffolding.SharpDevelop NuGet package.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=44455" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/NuGet/default.aspx">NuGet</category><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/T4/default.aspx">T4</category><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/AspNetMvc/default.aspx">AspNetMvc</category></item><item><title>Using T4MVC with SharpDevelop</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2012/09/15/UsingT4MVCWithSharpDevelop.aspx</link><pubDate>Sat, 15 Sep 2012 12:40:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:44326</guid><dc:creator>MattWard</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;a href="http://build.sharpdevelop.net/buildartefacts/#SDMAIN"&gt;SharpDevelop 4.3&lt;/a&gt; now has support for  &lt;a href="http://t4mvc.codeplex.com/"&gt;T4MVC&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://t4mvc.codeplex.com/"&gt;T4MVC&lt;/a&gt; is a set of T4 templates, created by &lt;a href="http://blog.davidebbo.com/"&gt;David Ebbo&lt;/a&gt;, that will generate strongly typed helpers for an ASP.NET MVC application. It will allow you to remove strings from your MVC application making your application easier to maintain.&lt;/p&gt;
&lt;p&gt;So let us take a look at how to use T4MVC with SharpDevelop. First you should open or &lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2012/01/29/AspNetMvcSupport.aspx"&gt;create a new ASP.NET MVC application in SharpDevelop&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Installing T4MVC&lt;/h2&gt;
&lt;p&gt;T4MVC is available as a &lt;a href="http://nuget.org/packages/T4MVC.SharpDevelop"&gt;NuGet package&lt;/a&gt;. The NuGet package you should download is &lt;a href="http://nuget.org/packages/T4MVC.SharpDevelop"&gt;T4MVC.SharpDevelop&lt;/a&gt;. This contains a modified version of the original T4MVC template that can be used with SharpDevelop. Further details on all the modifications made to the T4MVC template can be found at the end of this post. Install the T4MVC.SharpDevelop NuGet package either from the &lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2011/06/05/NuGetPowerShellConsole.aspx"&gt;NuGet package management console&lt;/a&gt; or by using the &lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2011/07/24/NuGet14.aspx"&gt;Manage Packages dialog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Note that T4MVC 2.13.0 requires SharpDevelop 4.3.0.9132 or above.&lt;/p&gt;
&lt;p&gt;After installation two new T4 template files will be added to your project.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;T4MVC.tt - main template that generates the strongly typed helpers.&lt;/li&gt;
&lt;li&gt;T4MVC.tt.settings.t4 - holds configuration settings used by main T4MVC.tt template.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Generating T4MVC&amp;#39;s Strongly Typed Helpers&lt;/h2&gt;
&lt;p&gt;To run the T4MVC template manually, select it in the &lt;strong&gt;Projects&lt;/strong&gt; window, right click and select &lt;strong&gt;Execute Custom Tool&lt;/strong&gt;. This will generate a set of files as dependencies of the T4MVC.tt file.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/T4MVCGeneratedFiles.aspx" alt="T4MVC Generated Files in Projects window" /&gt;&lt;/p&gt;
&lt;p&gt;It will also make some modifications to your controller classes.  The T4MVC template will change your controller classes so they are &lt;strong&gt;partial&lt;/strong&gt;. It will also change your controller methods so they are &lt;strong&gt;virtual&lt;/strong&gt;. What has been changed will be recorded as warnings in the &lt;strong&gt;Errors&lt;/strong&gt; window.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/T4MVCWarningsInErrorsWindow.aspx" alt="T4MVC modified code warnings in Errors window" /&gt;&lt;/p&gt;
&lt;p&gt;When you make modifications to your application you do not want to have to keep running the T4MVC template manually each time to regenerate the strongly typed helpers. Instead you can configure your project to re-generate the strongly typed helpers on each build.&lt;/p&gt;
&lt;h2&gt;Generating T4MVC&amp;#39;s Strongly Typed Helpers on each Build&lt;/h2&gt;
&lt;p&gt;To do this you should open the options for the project. From the &lt;strong&gt;Projects&lt;/strong&gt; menu and select &lt;strong&gt;Project Options&lt;/strong&gt;. Open the &lt;strong&gt;Custom Tool&lt;/strong&gt; tab. In this tab you can choose to run custom tools on each build. In the screenshot below the project is configured to run T4MVC on each build. &lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/T4MVCCustomToolProjectOptions.aspx" alt="Project options configured to run T4MVC on every build" /&gt;&lt;/p&gt;
&lt;p&gt;If you want to run other custom tools  you can add filenames for items in your project either as a comma separated list or with each file on a separate line. Currently there is no support for wildcards when specifying filenames.&lt;/p&gt;
&lt;p&gt;Now that we have generated the strongly typed helpers let us take a look at how to use a selection of them.&lt;/p&gt;
&lt;h2&gt;Using T4MVC&amp;#39;s Strongly Typed Helpers&lt;/h2&gt;
&lt;h3&gt;View Names&lt;/h3&gt;
&lt;p&gt;In your _ViewStart.cshtml you may have a reference to a Razor layout page.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;@{
    Layout = &amp;quot;~/Views/Shared/_Layout.cshtml&amp;quot;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can replace this string with a strongly typed helper.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;@{
    Layout = MVC.Shared.Views._Layout;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Action Links&lt;/h3&gt;
&lt;p&gt;In your views you may be passing action names and controller names as strings &lt;a href="http://msdn.microsoft.com/en-us/library/dd505070(v=vs.100)"&gt;HtmlHelper.ActionLink(string linkText, string actionName, string controllerName)&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    &amp;lt;li&amp;gt;@Html.ActionLink(&amp;quot;Home&amp;quot;, &amp;quot;Index&amp;quot;, &amp;quot;Home&amp;quot;)&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;@Html.ActionLink(&amp;quot;Contact&amp;quot;, &amp;quot;Contact&amp;quot;, &amp;quot;Home&amp;quot;)&amp;lt;/li&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Instead you can use code that looks like you are calling the controller method.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    &amp;lt;li&amp;gt;@Html.ActionLink(&amp;quot;Home&amp;quot;, MVC.Home.Index())&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;@Html.ActionLink(&amp;quot;Contact&amp;quot;, MVC.Home.Contact())&amp;lt;/li&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;CSS Links&lt;/h3&gt;
&lt;p&gt;You may be using strings for links, such as for CSS files, in your views.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;link href=&amp;quot;@Url.Content(&amp;quot;~/Content/Site.css&amp;quot;)&amp;quot; rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;These can be changed to use the Links.Content helper class.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;link href=&amp;quot;@Links.Content.Site_css&amp;quot; rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That is a very quick introduction to T4MVC and covers only a few of the helpers it provides. Further information on T4MVC can be found on the &lt;a href="http://community.sharpdevelop.net/blogs/mattward/articles/documentation.aspx"&gt;T4MVC Codeplex site&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Changes Made to Original T4MVC Template&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Visual Studio assembly references have been removed and replaced with a SharpDevelop assembly reference.&lt;/li&gt;
&lt;li&gt;Visual Studio namespace imports have been removed and replaced with namespace imports for SharpDevelop.&lt;/li&gt;
&lt;li&gt;Removed use of BeginInvoke/EndInvoke which was causing SharpDevelop to hang.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The SharpDevelop specific T4MVC template is maintained in a &lt;a href="http://community.sharpdevelop.net/blogs/mattward/articles/t4mvc-sharpdevelop.aspx"&gt;repository on github&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[Update 2012-10-11]&lt;/strong&gt; Added information on T4MVC 2.13.0 requiring a newer version of SharpDevelop 4.3. Updated &amp;quot;Changes made to original T4MVC template&amp;quot; section after SharpDevelop EnvDTE API was modified to follow Visual Studio&amp;#39;s API when using parameterised properties such as ProjectItem.FileNames() and CodeType.IsDerivedFrom()&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=44326" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/T4/default.aspx">T4</category></item><item><title>Installing SharpDevelop on Windows 8</title><link>http://community.sharpdevelop.net/blogs/christophwille/archive/2012/08/15/installing-sharpdevelop-on-windows-8.aspx</link><pubDate>Wed, 15 Aug 2012 19:41:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:43125</guid><dc:creator>ChristophWille</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;With Windows 8 released to MSDN and TechNet subscribers today, I thought it&amp;#39;d be a good idea to give a short guide for installing SharpDevelop on a blank Windows 8 installation - because it will fail with an error message (although the screenshot is for SharpDevelop 4.3, the same applies for 4.2):&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/christophwille/images/43122/original.aspx" border="0" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The easiest way to fix this is to install .NET 3.5 (used by lots of other applications / drivers, thus if you don&amp;#39;t install SharpDevelop first thing on Windows 8, it might just install right away because somebody else auto-installed this dependency).&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/christophwille/images/43123/original.aspx" border="0" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;You are looking for &amp;quot;Turn Windows features on or off&amp;quot; - this will open the &amp;quot;Windows Features&amp;quot; dialog on the desktop:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/christophwille/images/43124/original.aspx" border="0" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Make sure to check &amp;quot;.NET Framework 3.5&amp;quot;, click OK, let it connect to Windows Update and finish the installation. Once done, you can go back to installing SharpDevelop, as it now has all required dependencies!&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note&lt;/b&gt; You can alternatively install just the &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=5582"&gt;VC++ 2008 SP1 runtime.&lt;/a&gt;&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=43125" width="1" height="1"&gt;</description></item><item><title>Import and Export of Highlighting Settings</title><link>http://community.sharpdevelop.net/blogs/christophwille/archive/2012/08/13/import-and-export-of-highlighting-settings.aspx</link><pubDate>Mon, 13 Aug 2012 05:45:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:43110</guid><dc:creator>ChristophWille</dc:creator><slash:comments>4</slash:comments><description>&lt;p&gt;Yesterday, Siegfried put finishing touches on the import/export of color schemes in SharpDevelop. To give you an idea, let&amp;#39;s take a look at the following screenshot:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/photos/christophwille/images/43107/original.aspx" target="_blank"&gt;&lt;img src="http://community.sharpdevelop.net/photos/christophwille/images/43107/640x454.aspx" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is an imported color scheme from StudioStyl.es, more specifically &lt;a href="http://studiostyl.es/schemes/son-of-obsidian-with-resharper"&gt;http://studiostyl.es/schemes/son-of-obsidian-with-resharper&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now, how do you get one of those color schemes installed in SharpDevelop? You have to go to the Tools / Options dialog, Text Editor / Highlighting section:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/christophwille/images/43108/original.aspx" border="0" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;There you will find the &amp;quot;Import highlighting colors&amp;quot; button, that allows you to pick a highlighting definition - either one that was exported from SharpDevelop, or one that came from Visual Studio (as is the case with StudioStyl.es):&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/christophwille/images/43109/original.aspx" border="0" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Please do note that if you have existing customizations, the import will warn you that those will be reset (otherwise you might end up with very interesting intersections of color schemes).&lt;/p&gt;
&lt;p&gt;Speaking of interesting effects: if you compare the first screenshot with the first listing on the StudioStyl.es page, you will notice differences such as the type coloring or the constructor (eg line 15). The reason for this is that sometimes VS supports more options, other times it is SharpDevelop - thus there can&amp;#39;t be a perfect mapping when you import from a VS settings file. You might need to make slight adjustments in SharpDevelop after the import to get a perfect look.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=43110" width="1" height="1"&gt;</description></item><item><title>NUnit 2.6.1 Support</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2012/08/12/NUnit261Support.aspx</link><pubDate>Sun, 12 Aug 2012 14:05:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:43106</guid><dc:creator>MattWard</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;SharpDevelop 4.3 has been updated to use &lt;a href="http://nunit.org/index.php?p=releaseNotes&amp;amp;r=2.6.1"&gt;NUnit 2.6.1&lt;/a&gt; which was recently released. The full details on what has changed in NUnit 2.6.1 can be found in the &lt;a href="http://nunit.org/index.php?p=releaseNotes&amp;amp;r=2.6.1"&gt;NUnit release notes&lt;/a&gt;. One change in this release caused some of SharpDevelop&amp;#39;s own unit tests to break so this change is highlighted in the following section. &lt;/p&gt;
&lt;h2&gt;Running unit tests with an STA thread&lt;/h2&gt;
&lt;p&gt;NUnit 2.6 no longer reads settings from your test configuration file (app.config). This means that you can no longer make NUnit use the STA thread by &lt;a href="http://stackoverflow.com/questions/2434067/how-to-run-unit-tests-in-stathread-mode"&gt;setting the default apartment state in your app.config&lt;/a&gt; file. So the following app.config file will not work:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;configuration&amp;gt; 
    &amp;lt;configSections&amp;gt;
      &amp;lt;sectionGroup name=&amp;quot;NUnit&amp;quot;&amp;gt;
        &amp;lt;section name=&amp;quot;TestRunner&amp;quot;  type=&amp;quot;System.Configuration.NameValueSectionHandler&amp;quot; /&amp;gt;
        &amp;lt;/sectionGroup&amp;gt;
      &amp;lt;/configSections&amp;gt;
      &amp;lt;NUnit&amp;gt;
        &amp;lt;TestRunner&amp;gt;
           &amp;lt;!-- The ApartmentState value here is ignored. --&amp;gt;
           &amp;lt;add key=&amp;quot;ApartmentState&amp;quot; value=&amp;quot;STA&amp;quot; /&amp;gt;
        &amp;lt;/TestRunner&amp;gt;
      &amp;lt;/NUnit&amp;gt;
  &amp;lt;/configuration&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Instead you should use the &lt;a href="http://www.nunit.org/index.php?p=requiresSTA&amp;amp;r=2.6.1"&gt;RequiresSTA attribute&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;The RequiresSTA attribute can be used at the assembly, class or method level. To make NUnit to run all your unit tests with an STA thread you can add the following code to your AssemblyInfo.cs file in the project containing your unit tests.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;using NUnit.Framework;

[assembly: RequiresSTA]
&lt;/code&gt;&lt;/pre&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=43106" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/UnitTests/default.aspx">UnitTests</category></item><item><title>NRefactory 5 article</title><link>http://community.sharpdevelop.net/blogs/danielgrunwald/archive/2012/08/11/nrefactory-5-article.aspx</link><pubDate>Sat, 11 Aug 2012 16:36:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:43094</guid><dc:creator>DanielGrunwald</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I have published a CodeProject article documenting NRefactory 5: &lt;a href="http://www.codeproject.com/Articles/408663/Using-NRefactory-for-analyzing-Csharp-code"&gt;Using NRefactory for analyzing C# code&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;While NRefactory 5 itself is pretty much stable, there&amp;#39;s still a lot of work to do for SharpDevelop 5 to use it -- pretty much everything in SharpDevelop dealing with source code needs to be ported to the new NRefactory 5 API.&lt;/p&gt;
&lt;p&gt;But I think this article shows that NRefactory 5 will open up a lot of new feature possibilities. For example, we could detect problems like the missing StringComparison described in the article directly in the SharpDevelop editor while you&amp;#39;re typing, no need to recompile. In fact, the MonoDevelop project has two GSoC students working on such live issue detection and other code actions (small refactorings), and most of their code will be usable in both IDEs.&lt;/p&gt;
&lt;p&gt;So you can look forward to a much improved C# editing experience in SharpDevelop 5 :)&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=43094" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/danielgrunwald/archive/tags/NRefactory/default.aspx">NRefactory</category></item><item><title>Code Coverage with OpenCover</title><link>http://community.sharpdevelop.net/blogs/mattward/archive/2012/08/08/CodeCoverageWithOpenCover.aspx</link><pubDate>Wed, 08 Aug 2012 20:49:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:43074</guid><dc:creator>MattWard</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;SharpDevelop 4.3 now has integrated support for &lt;a href="http://community.sharpdevelop.net/blogs/mattward/articles/opencover.aspx"&gt;OpenCover&lt;/a&gt; thanks to &lt;a href="http://www.lextm.com/"&gt;Lex Li&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;OpenCover is an open source &lt;a href="http://en.wikipedia.org/wiki/Code_coverage"&gt;code coverage tool&lt;/a&gt; created by &lt;a href="http://scubamunki.blogspot.co.uk/"&gt;Shaun Wilde&lt;/a&gt;. It can be used to measure how much of your code is covered by your unit tests. OpenCover was created to fix the following problems in &lt;a href="http://sourceforge.net/projects/partcover/"&gt;PartCover&lt;/a&gt;, another open source code coverage tool.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;64 bit support&lt;/li&gt;
&lt;li&gt;Memory usage&lt;/li&gt;
&lt;li&gt;Returning no coverage results&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a more detailed look into why OpenCover was created you should read Shaun Wilde&amp;#39;s &lt;a href="http://scubamunki.blogspot.co.uk/2011/06/opencover-first-beta-release.html"&gt;OpenCover First Beta Release&lt;/a&gt; post.&lt;/p&gt;
&lt;p&gt;Back in 2006 SharpDevelop added support for NCover, then it switched to using PartCover a year later when NCover was turned into a commercial product. Now it supports and ships with OpenCover so let us take a tour of using OpenCover with SharpDevelop.&lt;/p&gt;
&lt;h2&gt;OpenCover Feature Tour&lt;/h2&gt;
&lt;p&gt;First you should install &lt;a href="http://build.sharpdevelop.net/buildartefacts/"&gt;SharpDevelop 4.3&lt;/a&gt;. Version 4.3.0.8911 or above will have OpenCover support. Then you will need to use a project with unit tests or alternatively you can &lt;a href="http://community.sharpdevelop.net/blogs/mattward/OpenCover/OpenCoverFeatureTour.zip"&gt;download a zip file&lt;/a&gt; which contains the set of projects created whilst writing this feature tour. Open your solution with SharpDevelop 4.3 and let us get started.&lt;/p&gt;
&lt;h2&gt;Running Unit Tests with Code Coverage&lt;/h2&gt;
&lt;p&gt;To run the unit tests with code coverage open the &lt;strong&gt;Unit Tests&lt;/strong&gt; window by selecting &lt;strong&gt;Tools&lt;/strong&gt; - &lt;strong&gt;Unit Tests&lt;/strong&gt; from the &lt;strong&gt;View&lt;/strong&gt; menu.  Right click the project or tests that you want to check for code coverage and select &lt;strong&gt;Run with code coverage&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/OpenCoverFeatureTourRunUnitTestsWithCodeCoverageUnitTestsWindowContextMenu.aspx" alt="Unit tests window Run with code coverage menu option" /&gt;&lt;/p&gt;
&lt;p&gt;At the top of the &lt;strong&gt;Unit Tests&lt;/strong&gt; window there is the run with code coverage toolbar button which can be also used to run code coverage for all the tests.&lt;/p&gt;
&lt;p&gt;Another way to run the unit tests with code coverage is to right click in the text editor and select the &lt;strong&gt;Run with code coverage&lt;/strong&gt; menu option.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/OpenCoverFeatureTourRunUnitTestsWithCodeCoverageTextEditorContextMenu.aspx" alt="Text editor Run with code coverage menu option" /&gt;&lt;/p&gt;
&lt;p&gt;The unit tests will then be run and OpenCover will profile your code. The output from OpenCover will be displayed in the &lt;strong&gt;Output&lt;/strong&gt; window. Once OpenCover is finished the code coverage results will be displayed in the &lt;strong&gt;Code Coverage&lt;/strong&gt; window.&lt;/p&gt;
&lt;h2&gt;Code Coverage Results&lt;/h2&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/OpenCoverFeatureTourCodeCoverageResultsWindow.aspx" alt="Code coverage results window" /&gt;&lt;/p&gt;
&lt;p&gt;The code coverage window will show you the percentage of code covered for each class, method and property. On the right hand side you can see the visit count information or if you select the &lt;strong&gt;Show Source Code&lt;/strong&gt; option you can see the corresponding source code with covered code highlighted in green and uncovered code highlighted in red.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/OpenCoverFeatureTourCodeCoverageResultsWindowShowSourceCode.aspx" alt="Code coverage results window show source code option" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/OpenCoverFeatureTourCodeCoverageResultsWindowWithSourceCode.aspx" alt="Code coverage results window with source code" /&gt;&lt;/p&gt;
&lt;p&gt;The Code Coverage window also allows you to enable or disable code coverage highlighting in the text editor. The top left button in the Code Coverage window is used to enable or disable code coverage highlighting in the text editor.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/OpenCoverFeatureTourCodeCoverageResultsWindowToggleCodeCoverageHighlighting.aspx" alt="Code coverage window - toggle code coverage highlighting" /&gt;&lt;/p&gt;
&lt;p&gt;In the screenshot below the text editor has covered code in highlighted in green and uncovered code in highlighted in red.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/OpenCoverFeatureTourTextEditorCodeCoverageHighlighting.aspx" alt="Code coverage highlighting in text editor" /&gt;&lt;/p&gt;
&lt;h2&gt;Filtering Code Coverage Results&lt;/h2&gt;
&lt;p&gt;By default OpenCover will show you code coverage for all your code including your tests. Typically you are not interested in code coverage for your unit tests. To exclude classes you can use a filter. The filters you can use are described on the &lt;a href="http://community.sharpdevelop.net/blogs/mattward/articles/Usage.aspx"&gt;OpenCover wiki&lt;/a&gt;. To specify a filter in your unit tests project select &lt;strong&gt;Project Options&lt;/strong&gt; from the &lt;strong&gt;Project&lt;/strong&gt; menu.  Then open the &lt;strong&gt;Code Coverage&lt;/strong&gt; tab. Here you can specify an include or exclude filter. In the screenshot below all types in the &lt;strong&gt;OpenCoverageFeatureTour.Tests&lt;/strong&gt; assembly will be excluded.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/OpenCoverFeatureTourFilteringCodeCoverage.aspx" alt="Filtering code coverage results" /&gt;&lt;/p&gt;
&lt;h2&gt;64 bit or 32 bit&lt;/h2&gt;
&lt;p&gt;On Windows x64 if your test project is set to target a 32 bit processor then the 32 bit version of NUnit will be used to run your unit tests. If it is set to &lt;strong&gt;Any CPU&lt;/strong&gt; or a 64 bit processor then NUnit will run as a 64 bit process as OpenCover profiles your code.&lt;/p&gt;
&lt;h2&gt;Code Coverage Options&lt;/h2&gt;
&lt;p&gt;The colours used to highlight code coverage in the text editor and Code Coverage window can be configured in the Options dialog. From the &lt;strong&gt;Tools&lt;/strong&gt; menu select &lt;strong&gt;Options&lt;/strong&gt;. Then expand the &lt;strong&gt;Tools&lt;/strong&gt; category and select &lt;strong&gt;Code Coverage&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.sharpdevelop.net/photos/mattward/images/original/OpenCoverFeatureTourCodeCoverageOptions.aspx" alt="Code coverage tools options dialog" /&gt;&lt;/p&gt;
&lt;p&gt;That ends the tour of using OpenCover with SharpDevelop.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=43074" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/mattward/archive/tags/CodeCoverage/default.aspx">CodeCoverage</category></item><item><title>ILSpy 2.1 async/await Decompilation Support</title><link>http://community.sharpdevelop.net/blogs/christophwille/archive/2012/06/03/ilspy-2-1-async-await-decompilation-support.aspx</link><pubDate>Sun, 03 Jun 2012 14:47:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:41607</guid><dc:creator>ChristophWille</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&amp;nbsp;ILSpy 2.1 is available as of now - it supports async/await decompilation:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sourceforge.net/projects/sharpdevelop/files/ILSpy/2.0/ILSpy_Master_2.1.0.1603_RTW_Binaries.zip/download"&gt;ILSpy_Master_2.1.0.1603_RTW_Binaries.zip&lt;/a&gt;&lt;br /&gt;&lt;a href="http://sourceforge.net/projects/sharpdevelop/files/ILSpy/2.0/ILSpy_Master_2.1.0.1603_RTW_Source.zip/download"&gt;ILSpy_Master_2.1.0.1603_RTW_Source.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
A few weeks ago, Daniel blogged about the &lt;a href="http://community.sharpdevelop.net/blogs/danielgrunwald/archive/2012/04/16/decompiling-async-await.aspx"&gt;details of how decompiling async / await is implemented&lt;/a&gt;. If you are only interested in the results, see the below screenshot for a proof of decompilation working (on Windows 8 RP):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/photos/christophwille/images/41606/original.aspx" target="_blank"&gt;&lt;img src="http://community.sharpdevelop.net/photos/christophwille/images/41606/secondarythumb.aspx" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As a reminder: next week on Friday we&amp;#39;ll do a &lt;a href="http://community.sharpdevelop.net/blogs/christophwille/archive/2012/05/31/webcast-ilspy-q-amp-a-friday-june-8th.aspx"&gt;Webcast on ILSpy&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=41607" 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.3: Input Method Editor support</title><link>http://community.sharpdevelop.net/blogs/siegfried_pammer/archive/2012/06/02/avalonedit-4-3-input-method-editor-support.aspx</link><pubDate>Sat, 02 Jun 2012 07:02:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:41583</guid><dc:creator>siegi44</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Good news for all Chinese, Japanese and Korean users of AvalonEdit  (and others using complex script). Recently we were able to add integrated support for IMEs (Input Method Editors) in the latest version of AvalonEdit.&lt;/p&gt;
&lt;p&gt;Before: The IME is floating outside of the text area.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/blogs/siegfried_pammer/imetest.png"&gt;&lt;img src="http://community.sharpdevelop.net/blogs/siegfried_pammer/imetest.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After: The IME is directly integrated into the editor. In the first part you can see Korean IME, in the second one Japanese IME in Hiragana Mode.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://community.sharpdevelop.net/blogs/siegfried_pammer/imetest2.png"&gt;&lt;img src="http://community.sharpdevelop.net/blogs/siegfried_pammer/imetest2.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Tested on: Windows 7&lt;/p&gt;
&lt;p&gt;In the development team we don&amp;#39;t use IME and we couldn&amp;#39;t test it very well, due to a lack of knowledge of the specific languages. (I only know a little Korean and even less Japanese.) So if you run into a bug while using it, please report it on the forums.&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=41583" width="1" height="1"&gt;</description></item><item><title>Webcast: SharpDevelop Q&amp;A Saturday June 9th</title><link>http://community.sharpdevelop.net/blogs/christophwille/archive/2012/05/31/webcast-sharpdevelop-q-amp-a-saturday-june-9th.aspx</link><pubDate>Thu, 31 May 2012 07:31:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:41568</guid><dc:creator>ChristophWille</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;From June 7th to June 10th the SharpDevelop team met in Bad Ischl, Austria for their annual #develop developers days (#d^3). This year we did a virtual Q&amp;amp;A session, where we talked about roadmap, architecture, implementation and extensibility.&lt;/p&gt;
&lt;p&gt;The recording of the Webcast is available on YouTube: &lt;a href="http://www.youtube.com/watch?v=5HaTYJ3AThQ"&gt;http://www.youtube.com/watch?v=5HaTYJ3AThQ&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;From our end Daniel, David and myself took part, and as a special guest we had Mike Kr&amp;uuml;ger from MonoDevelop.&lt;/p&gt;
&lt;p&gt;There are quite a few interesting tidbits, but we won&amp;#39;t spoil it for you - make sure to watch the recording!&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=41568" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/christophwille/archive/tags/SharpDevelop/default.aspx">SharpDevelop</category><category domain="http://community.sharpdevelop.net/blogs/christophwille/archive/tags/Webcast/default.aspx">Webcast</category></item><item><title>Webcast: ILSpy Q&amp;A Friday June 8th</title><link>http://community.sharpdevelop.net/blogs/christophwille/archive/2012/05/31/webcast-ilspy-q-amp-a-friday-june-8th.aspx</link><pubDate>Thu, 31 May 2012 07:29:00 GMT</pubDate><guid isPermaLink="false">1b90d1c1-04e6-45b0-b51d-b665527d49b9:41567</guid><dc:creator>ChristophWille</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;From June 7th to June 10th the SharpDevelop team met in Bad Ischl, Austria for their annual #develop developers days (#d^3). This year we did a virtual Q&amp;amp;A session, where we talked about roadmap, architecture, implementation and extensibility.&lt;/p&gt;
&lt;p&gt;The recording of the Webcast is available on YouTube: &lt;a href="http://www.youtube.com/watch?v=dO2BdIMckcY"&gt;http://www.youtube.com/watch?v=dO2BdIMckcY&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Notes on a few glitches: in the introduction I missed Daniel (sorry!), and there was one recording glitch - my machine is Windows 8 RP, and somehow it didn&amp;#39;t record the window content of Internet Explorer 10 but used the default start screen. The link I was mentioning for &lt;a href="http://wiki.sharpdevelop.net/ILSpy%20Plugins.ashx"&gt;ILSpy plugins is this one here&lt;/a&gt; (it then worked perfectly fine on Daniel&amp;#39;s machine).&lt;/p&gt;
&lt;p&gt;At the end, David posed an interesting question: Would editing an assembly you are currently debugging in the ILSpy debugger be useful? Adding in general: we need your feedback for improving features as well as prioritizing which ones you need first. Please let us know!&lt;/p&gt;&lt;img src="http://community.sharpdevelop.net/aggbug.aspx?PostID=41567" width="1" height="1"&gt;</description><category domain="http://community.sharpdevelop.net/blogs/christophwille/archive/tags/ILSpy/default.aspx">ILSpy</category><category domain="http://community.sharpdevelop.net/blogs/christophwille/archive/tags/Webcast/default.aspx">Webcast</category></item><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>1</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></channel></rss>