SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Matt Ward

January 2011 - Posts

  • NuGet Support in SharpDevelop

    SharpDevelop 4.1 now includes support for NuGet. You can now add references to NuGet packages to your projects from SharpDevelop.

    Adding NuGet Packages

    To add a NuGet package reference select your project in the Projects window, right click and select Add Package Reference.

    Add Package Reference menu item

    The Add Package Reference dialog will then be displayed.

    Add Package Reference dialog

    The dialog has four tabs at the top. The Installed tab shows all packages that have been installed for the current project. The Available tab shows all the packages available from the NuGet package repository. The Updates tab shows the packages that have newer versions available. The Recent tab shows packages that were recently installed.

    Select the Available tab to show the packages that can be installed. Information on a package will be displayed on the right hand side when the package is selected.

    To find a package you can either page through the packages by clicking the arrows and page numbers underneath or you can search for a package by name. To search for a package enter the name in the search text box at the top right and press return or click the search icon. The matching packages will then be displayed. To clear the search results remove the search text and run the search again.

    Searching for package references

    To install a package, select it and click the Add button. If the package requires you to accept a license agreement a dialog will be displayed allowing you to accept or decline the agreement.

    Package license agreement window

    After that the package and any dependencies will be installed. Your project will be updated to include new assembly references and source code files from the package. The installed package will now have green tick icon next to it showing that is has been installed.

    NuGet package installed

    Click the Close button to close the Add Package Reference dialog.

    Removing NuGet Packages

    To remove a NuGet package open the Add Package Reference dialog and select the Installed tab.

    Installed packages in the Add Package Reference dialog

    Select the package you want to remove and click the Remove button. The package will then be removed and your project will be updated.

    Updating NuGet Packages

    To update a NuGet package open the Add Package Reference dialog and select the Updates tab.

    Package updates in the Add Package Reference dialog

    Select the package you want to update and click the Add button. The package and its dependencies will then be updated.

    Configuring NuGet

    By default the official NuGet repository will be used when searching for available packages. If you want to set up a different NuGet repository, such as one on your local file system, then select Options from the Tools menu. In the Options dialog select Package Management and then Package Sources.

    Packagement repository configuration

    Here you can add and remove NuGet repositories as required.

    Under the General options you can clear the recent packages and the local package repository cache.

    General Package Management options

    PowerShell Console

    SharpDevelop has a PowerShell console that can be used to install NuGet packages with PowerShell scripts.

    PowerShell console window

    Further information on the PowerShell console can be found in the NuGet PowerShell Console post.

    Posted Jan 23 2011, 02:27 PM by MattWard with 1 comment(s)
    Filed under:
  • NuGet Packages for SharpDevelop

    Now that NuGet 1.0 has been released and the NuGet package submission process has been made much easier there are now NuGet packages for SharpDevelop that can be downloaded from the main NuGet package repository.

    SharpDevelop packages in NuGet Add Package Reference dialog

    The packages currently available are:


    Contains AvalonEdit the WPF-based text editor that is included with SharpDevelop 4.0. Two versions of AvalonEdit are included. One that targets .NET 3.5 and one that targets .NET 4.0. Download this package if you just want the AvalonEdit assembly and nothing else.


    Contains sample code for AvalonEdit taken from Daniel Grunwald's CodeProject article. The sample code shows how to use the text editor's inside a WPF application including a simple example of code completion.

    To get the sample code working in a WPF application created in Visual Studio 2010 you will need to:

    1. Add references to System.Windows.Forms and WindowsFormsIntegration.
    2. Modify your App.xaml file so the StartupUri points to the AvalonEdit Sample window.



    Contains the text editor that is included in SharpDevelop 3.2.1. This text editor targets .NET 2.0.


    Contains sample code for the text editor that is included in SharpDevelop 3.2.1. The code shows how to use the text editor in a Windows Forms application including a simple example of code completion.


    Posted Jan 16 2011, 10:42 PM by MattWard with no comments
    Filed under:
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this ( email address.