This is a minimal viable set of C# bindings for building csharp code with mono. It's still pretty rough but it works as a proof of concept that could grow into something more. If windows support ever happens for Bazel then this might become especially valuable.
csharp_library
csharp_library( name="MyLib", srcs=["MyLib.cs"], deps=["//my/dependency:SomeLib"], )
csharp_binary
csharp_binary( name="MyApp", main="MyApp", # optional name of the main class. srcs=["MyApp.cs"], deps=["//my/dependency:MyLib"], )
csharp_nunit_test
csharp_nunit_test( name="MyApp", srcs=["MyApp.cs"], deps=["//my/dependency:MyLib"], )
Copy the contents of the dotnet.WORKSPACE file into your WORKSPACE file.