Tag Archives: mono

Logging in .NET Mono on Linux and Windows using NLog

Here is a simple application that will log to console and syslog demon. On Windows platform we can use free edition of Kiwi Syslog Server. On Linux application will use both local and remote syslog. As a logger library I use NLog.

Sample solution can be downloaded from here https://github.com/mchudinov/LoggingNLog. It is compatible with Visual Studio 2012, Mono Develop 5, and Xamarin Studio 5.
Continue reading

Packaging of a Mono application on Linux

How to package a Mono (.NET) applications for Debian-based Linux in command line. Packaging process can be easily automated on Continues Integration Server.

debian_package

Package building workflow is quite simple:

  • Assign a version number to a .NET assembly code
  • Build binaries
  • Copy binaries to package folder and build deb-package with the same version as an assembly

Build process will be controlled by MSBuild project file and run from a continues integrations server. MSBuild on Mono platform is substituted by xbuild utility.

Sample solution is available for download here https://github.com/mchudinov/PackagingMono. Solution is compatible with Visual Studio 2012, MonoDevelop/Xamarin Studio 5.

This is my third blogpost about automation of development workflow with Mono. Automated building and versioning were covered in my previous posts:

Continue reading

Logging in .NET with AOP using PostSharp

Here is a simple application that logs to console. Logging is programmed with Aspect Oriented Programming paradigm as an aspect using PostSharp. As a logger library I use log4net.

postsharp

Sample solution can be downloaded from here https://github.com/mchudinov/LoggingPostSharp. It is compatible with Visual Studio 2012, MonoDevelop 5, and Xamarin Studio 5.
Continue reading

Logging in .NET Mono on Linux and Windows using log4net

Here is a simple application that will log to console and syslog demon. On Windows platform we can use free edition of Kiwi Syslog Server. On Linux application will use both local and remote syslog. As a logger library I use log4net.

Sample solution can be downloaded from here https://github.com/mchudinov/Logging. It is compatible with Visual Studio 2012, Mono Develop 5, and Xamarin Studio 5.
Continue reading

Building and testing .NET application in command line

Setup: Windows – .NET 4.5, Linux – Mono 3, Mint 17 (based on Ubuntu 14). I need to build and test .NET application from command line and on CI server.
Sample solution can be downloaded from here https://github.com/mchudinov/BuildingTesting. Solution is compatible with MonoDevelop 5, Xamarin Studio 5 and Visual Studio 2012,2013,2015.

building_bricks

1. Building in command line

There are two standard command line building tools for .NET: MSBuild on Windows and xbuild on Linux/Mono. xbuild build files are compatible (with some exceptions) with MSBuild files.

We need at least 4 simple steps (targets as they called in MSBuild terminology) to build a .NET solution:

  • Clean
  • Restore NuGet packages
  • Build binaries
  • Run unit tests

Continue reading

Free .NET development software alternatives

The standard software stack for a .NET developer is

  • OS – desktop Windows
  • IDE – Visual Studio
  • Database – SQL Server

All these components are quite pricey. But there are free alternatives. And with my recent project I decided to use alternative software for development and production in .NET, all totally free.

  • OS – Linux Mint 17 (based on Debian/Ubuntu)
  • IDE – MonoDevelop
  • Database – MySQL Community Edition

monodevelop
Sample solution can be downloaded from here https://github.com/mchudinov/EF6MySQL
Continue reading