From Blue-IT.org Wiki

Programming MS Office in C# - Why?

There are a lot of complaints on not developing open source software on csharp (Stallman - Don't depend on mono). There might be or might be not an software patent issue with C# in future.

Unfortunately it is obvious, that a lot of software has to be developed for Microsoft Office out there. As a programmer addicted to document management, I can't ignore that. So I was looking around searching to get my work done without beeing bundled with Visual Studio ...

As long as Microsoft products are tight to C# in this way it is wise to use this programming language in a pragmatic manner.

C# sharp has a lot of interesting features. And the code base is open!


Xamarin official site

This is the official site. There are links how to get this with

If you ever have problems with older packages, simply remove them:

apt-get remove libmono-*
apt-get install monodevelop


If you ever have problems with older packages, simply remove them:

apt-get remove libmono-*

--Apos (talk) 22:58, 10 July 2014 (CEST) The inizan-yannick-ppa in this list seems to be one of the stable ones (to be tested)

sudo apt-add-repository ppa:inizan-yannick/mono
sudo apt-get update
sudo apt-get install monodevelop mono
apt-get remove libmono-*
apt-get install monodevelop


The Manufactor describes the advantages of developing for MS Office with its product in the following way:

Why NetOffice?

The usual methods for accessing Microsoft Office. NET are the Primary Interop Assemblies and VSTO. Both access methods involve various disadvantages.

They are limited to a version, i.e. they only work with one or certain versions of Office They cause problems while transferring or installation on other systems They offer no protection mechanism in the management of COM proxies

NetOffice eliminates these disadvantages and remains a 1:1 wrapper that is syntactically and semantically identical to the interop assemblies.


CSharp compiler mono

Shellscripts in Mono

Shellscripts in Windows

Compiling an application

c:\Windows\Microsoft.NET\Framework\v3.5\csc.ext /t:exe /out:my.exe my.cs

Simple application example

using System;
using System.Diagnostics;
using System.ComponentModel;

public class Script
	/// Add a shared network drive mapping
	/// </summary>
	/// <param name="uri">The drive letter (e.g. L:)</param>
	/// <param name="unc">The UNC path to the remote drive (e.g. \\MyServer\MyPrinter)</param>
	/// <param name="opt">Mount options (e.g. /persistent:yes /credsave)</param>
	static void MapNetworkDrive(string uri, string unc, string opt)
		ProcessStartInfo pInfo = new ProcessStartInfo("net", "use " + uri + " " + unc + " " + opt);
		pInfo.CreateNoWindow = false;
		pInfo.UseShellExecute = true;
		pInfo.WindowStyle = ProcessWindowStyle.Hidden;
		Process RunIt = Process.Start(pInfo);
		RunIt.WaitForExit(5000); //give it some time to finish
	static void Main()
		MapNetworkDrive("Z:", "\\servername\share", "/savecred");