Saturday, June 4, 2011

The Ultimate List of Freely Available .NET Libraries

Ajax



  • Ajax Control Toolkit - Microsoft

  • AJAXNet Pro

  • ASP.NET MVC Project Awesome - a rich set of helpers (controls) that you can use to build highly responsive and interactive Ajax-enabled Web applications. These helpers include Autocomplete, AjaxDropdown, Lookup, Confirm Dialog, Popup Form and Pager. Thanks Omu (April 20, 2011)


Build Tools



  • Prebuild - Generate project files for all VS version, including major IDE's and tools like SharpDevelop, MonoDevelop, NAnt and Autotools

  • Genuilder - Precompiler which lets you transform your source code during the build. Thanks Harry McIntyre (April 13, 2011)


Charting/Graphics



Collections/Generics



  • PowerCollections - is a library that provides generic collection classes that are not available in the .NET framework. Some of the collections included are the Deque, MultiDictionary, Bag, OrderedBag, OrderedDictionary, Set, OrderedSet, and OrderedMultiDictionary. Thanks Adam Ralph (April 20, 2011)


Compression



Controls



  • Krypton - Free winform controls. Link fixed (April 14, 2011)

  • Source Grid - A Grid control

  • DevExpress - Over 60 Free Controls from DevExpress. Thanks Florian Standhartinger (April 20, 2011)

  • ObjectListView - is a C# wrapper around a .NET ListView. It makes the ListView much easier to use and provides some neat extra functionality. Thanks Florian Standhartinger (April 20, 2011)


Data Mapper



Dependency Injection/Inversion of Control



Design by Contract



IDE



  • SharpDevelop - is a free IDE for C#, VB.NET and Boo projects. Thanks Florian Standhartinger (April 20, 2011).


Logging



ORM



PDF Creators/Generators



Automated Web Testing



Misc Testing/Qualitysupport/Behavoir Driven Development (BDD)



URL Rewriting



MS Word/Excel Documents Manipulation



  • DocX to create, read, manipulate formatted word documents. Easy syntax, working nicely, actively developed. No Microsoft Office necessary.

  • Excel XML Writer allows creation of .XLS (Excel) files. No Microsoft Office necessary. Been a while since it has been updated. It also provides code generator to create code from already created XLS file (saved as xml). Haven't tested this but looks very promising. Too bad author is long time gone.

  • Excel Reader allows creation/reading of .XLS (Excel) files. No Microsoft Office necessary. Been a while since it has been updated.

  • Excel Package allows creation/reading of .XLSX (Excel 2007) files. No Microsoft Office necessary. Author is gone so it's out of date.

  • EPPlus is based on Excel Package and allows creation/reading of .XLSX (Excel 2007). It is actually the most advanced even comparing to NPOI.

  • NPOI is the .NET version of POI Java project at http://poi.apache.org/. POI is an open source project which can help you read/write xls, doc, ppt files.

  • sharp2word - a Word 2003 XML Documents Generator from C# code without any components or libraries. Thanks dublicator (April 20, 2011)

  • ClosedXML - an actively developed library for generating OpenXML Excel files. Thanks Joseph Robichaud (April 26, 2011)


Serialization



  • sharpserializer - xml/binary serializer for wpf, asp.net and silverlight

  • Protobuf.NET - fastest serialization port protobuf format into .NET platform. Thanks slava pocheptsov (April 26, 2011)


Silverlight



Social Media



  • LinqToTwitter - Linq-based wrapper for all Twitter API functionality in C#

  • Facebook C# SDK - A toolkit for creating facebook applications / integrating websites with Facebook using the new Graph API or the old rest API.


Package managers for external libraries



  • NuGet (formerly known as NuPack) - Microsoft (developer-focused package management system for the .NET platform intent on simplifying the process of incorporating third party libraries into a .NET application during development)

  • OpenWrap - Sebastien Lambla - Open Source Dependency Manager for .net applications


Unit Testing/Mocking



Validation



Threading



  • Smart Thread Pool - Thread Pool management library

  • Retlang - a high performance C# threading library. Thanks MarcBot (April 13, 2011)

  • bbv.Common - an open source library of software components that makes building multi-threaded, event-based and loosely coupled systems easy. Thanks Urs Enzler (April 14, 2011)

  • PowerThreading - a llibrary (DLL) containing many classes to help with threading and asynchronous programming. Thanks Adam Ralph (April 20, 2011)


Unclassified



  • CSLA Framework - Business Objects Framework

  • AForge.net - AI, computer vision, genetic algorithms, machine learning

  • Prism - Composit UI application block for WPF, Silverlight and WP7 - Microsoft patterns & practices

  • Enterprise Library 5.0 - Logging, Exception Management, Caching, Cryptography, Data Access, Validation, Security, Policy Injection - Microsoft patterns & practices

  • File helpers library

  • C5 Collections - Collections for .NET

  • Quartz.NET - Enterprise Job Scheduler for .NET Platform

  • MiscUtil - Utilities by Jon Skeet

  • Noda Time - DateTime replacement (idomatic port of Joda Time from Java)

  • Lucene.net - Text indexing and searching

  • Json.NET - Linq over JSON

  • Flee - expression evaluator

  • PostSharp - AOP

  • IKVM - brings the extensive world of Java libraries to .NET.

  • C# Webserver - Embeddable webserver

  • Long Path - Microsoft

  • .NET Engines for the GOLD Parsing System

  • NCQRS - library for event-driven architectures (CQRS).

  • Reactive Extensions for .NET - a library for composing asynchronous and event-based programs using observable collections. Thanks steve (April 14, 2011)

  • Mono.GameMath - a project to develop a highly-performant math library for games, based on XNA APIs. Thanks Alex Rønne Petersen (April 14, 2011)

  • SLSharp - a runtime IL-to-GLSL translation engine, allowing people to write GLSL shaders as C# code. Thanks Alex Rønne Petersen (April 14, 2011)

  • InfusionSoftDotNet - a dll to ease the pain for .Net developers to access the InfusionSoft API. Thanks Michael Gibbs (April 20, 2011)

  • re-mix - provides mixins for C# and Visual Basic .NET. Thanks Stefan Papp (April 20, 2011)

  • Mono.Cecil - a library written by Jb Evain to generate and inspect programs and libraries in the ECMA CIL format. It has full support for generics, and support some debugging symbol format. Thanks Florian Standhartinger (April 20, 2011)

Hide Form from Alt+Tab

Hide Form from Start Bar
To prevent a form from appearing in the Windows Start bar, add this statement to the form’s constructor:

this.ShowInTaskbar = false;Hide Tool Window from Alt+Tab
To prevent a form from appearing in the list of windows shown when the user presses Alt+Tab, you can designate the form to be a tool window. Note that you can use SizableToolWindow or FixedToolWindow, and ShowInTaskbar must be set to false:

this.FormBorderStyle = FormBorderStyle.SizableToolWindow;
this.ShowInTaskbar = false;



Hide Borderless Form from Alt+Tab
However, if you want the form to be borderless, then you need to add the following statements to the form’s constructor:

this.FormBorderStyle = FormBorderStyle.None;
this.ShowInTaskbar = false;AND you must add the following method to your derived Form class:

protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
// turn on WS_EX_TOOLWINDOW style bit
cp.ExStyle |= 0x80;
return cp;
}
}

Reading the contents of a web page is easy in C#

Reading the contents of a web page is easy in C# with the System.Net.WebClient class:


using System.Net;
using System.Windows.Forms;

string url = "http://www.devtopics.com";
string result = null;

try
{
WebClient client = new WebClient();
result = client.DownloadString( url );
}
catch (Exception ex)
{
// handle error
MessageBox.Show( ex.Message );
}The web page is read into the ‘result’ string. Note the URL you pass to the DownloadString method must have the http:// prefix, otherwise it will throw a WebException.

A more complicated but also more flexible solution is to use the System.Net.HttpWebRequest class, which enables you to interact directly with servers using HTTP:




using System.Net;
using System.IO;
using System.Windows.Forms;

string result = null;
string url = "http://www.devtopics.com";
WebResponse response = null;
StreamReader reader = null;

try
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create( url );
request.Method = "GET";
response = request.GetResponse();
reader = new StreamReader( response.GetResponseStream(), Encoding.UTF8 );
result = reader.ReadToEnd();
}
catch (Exception ex)
{
// handle error
MessageBox.Show( ex.Message );
}
finally
{
if (reader != null)
reader.Close();
if (response != null)
response.Close();
}