ClamAV# (pronounced “ClamAV Sharp”) is a .NET  language binding for the ClamAV virus scanner. This library helps you to easily integrate the ClamAV antivirus engine into your managed-code software by acting as a shim between your application and the native-code libclamav library.

It works with .NET 2.0+ and any recent version of the libClamAV library. Releases older than 0.94 are not officially supported as they have been marked ‘end-of-life’.

ImportantCurrently, the library has not reached release quality. Any builds available on this page should be considered pre-beta grade software and should not be used in production. A nightly build will occasionally be listed in the ‘Binaries’ tab in the Download section below, these builds will have undergone a reasonable amount of testing and can be used for experimental purposes.

[divider]News [/divider]
3rd January 2012 – Sorry for the delay. A new build will drop shortly now that things have settled down after my house and job move.

13th July 2011 – Released a new nightly build that incorporates deferred signature loading. This means that there is no delay when creating a new instance of ClamAV, the signature loading process will instead occur transparently when necessary.

10th June 2011 – Initial nightly build released.

[divider]Features [/divider]
Fully Managed-Code
ClamAV# provides a comprehensive, managed code interface to the libclamav.dll file that is distributed as part of ClamAV. It abstracts away memory management and interop issues and instead prevents a clean, object-oriented interface while still preserving the functionality and customisability of the ClamAV engine. Even better, the dll is compatible with all versions of the .NET Framework from 2.0 and above.

Tiny, 12 KB Shim
At just 12 KB it’s now easy to integrate ClamAV into your application with a minimal overhead. The managed side of the shim has been extensively profiled too so that performance is comparable to using libclamav.dll natively.

Compatible with ClamAV 0.97+
The 2.x series of ClamAV# brings API compatibility with the latest versions of ClamAV including the current 0.97.1 release.

[divider]Download and Get Started [/divider]
[tabs tab1="Binaries" tab2="Source Code" tab3="Documentation" tab4="Commit Log"]
[tab]This is probably what you’re looking for. This dll is built for the .NET Framework 2.0 and above and can be added as a reference to your solution via Visual Studio.

[button link="http://www.paulbeesley.com/files/clamavsharp/ClamAVSharp%20-%2020110713.dll" size="small" target="self"]Download Nightly[/button]

Remember that you will also need a compiled copy of the “libclamav” dll as this contains the actual scan engine and associated functionality. You could compile your own but I recommend the builds available at http://oss.netfarm.it/clamav/ as these are what I test against.
[/tab]
[tab]The source code repository is maintained over at GitHub, where you can take a copy of the  latest trunk builds and also report issues.

[/tab]
[tab]
Both a Doxygen report (class and method overview) and a sample project are provided to help get you started with ClamAV#. The project is not comprehensive, it just contains the bare minimum needed to get an on-demand scanner up and running.

[/tab]
[tab]The latest testing version is an alpha build from 10/06/2011. There is presently no stable version.

[/tab]
[/tabs]
[divider]Credits & License [/divider]
The original ClamAV# library was written by Pascal de Bruijn.

The library is licensed under the GNU General Public License (GPL), version 2. For more information on this license and to read its full text see here.