tree: fc8968c41f45ffb047b56fa454884727af3db88a [path history] [tgz]
  1. BUILD
  2. csharp.bzl
  3. dotnet.WORKSPACE
  4. nunit.BUILD
  5. README.md
tools/build_defs/dotnet/README.md

Intro

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.

Rules

  • 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"],
      )
    

Shared attributes for all csharp rules

Usage

Copy the contents of the dotnet.WORKSPACE file into your WORKSPACE file.

Things still missing:

  • Handle .resx files correctly.
  • .Net Modules
  • building documentation.
  • Pulling Mono in through a mono.WORKSPACE file.

Future nice to haves:

  • building csproj and sln files for VS and MonoDevelop.
  • Nuget Packaging
  • Windows .Net framwork support