Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Cross-platform DNX-based C# boilerplate configured with xUnit

License

Notifications You must be signed in to change notification settings

kasperisager/csharp-boilerplate

Repository files navigation

C# Boilerplate

Cross-platform DNX-based C# boilerplate configured with xUnit.

Travis

Legend

Folder / File Description
src/ This folder contains all the source code for your project.
src/Application/Program.cs This class is the main entry point to your application and its Main() method will be executed when the application is run.
src/Application/project.json This file is the manifest for your application and defines meta data as well as package and framework dependencies.
test/ This folder contains all the test specifications for your project.
test/Application.Test/project.json This is the manifest for your test specification and works exactly like the application manifest.
lib/ This folder contains any third-party libraries not available via the package manager.
build/ This folder contains all the built assemblies from your applications and test specifications.
packages/ This folder contains all packages installed by the package manager.
.editorconfig This file describes the editor formatting settings to be used in editors and IDEs.
Makefile This file describes all the build system targets available for your project.
global.json This file is the global project manifest and defines the different project sources and runtime frameworks.

Requirements

  • DNVM - .NET SDK Manager

Installation

OS X

Official instructions: http://docs.asp.net/en/latest/getting-started/installing-on-mac.html

First off, make sure you have Homebrew installed. Then install the following packages:

$ brew install mono
$ brew install aspnet/dnx/dnvm

Finally, add the following line to your Shell profile (~/.bash_profile, ~/.zshrc, etc.):

source dnvm.sh

Linux

Official instructions: http://docs.asp.net/en/latest/getting-started/installing-on-linux.html

The easiest way to get started with the boilerplate on Linux is using Docker: http://blogs.msdn.com/b/webdev/archive/2015/01/14/running-asp-net-5-applications-in-linux-containers-with-docker.aspx. You can also go to the official installation instructions for a guide on how to install DNVM manually.

Windows

Official instructions: http://docs.asp.net/en/latest/getting-started/installing-on-windows.html

To get started on Windows you need to install the latest preview of Visual Studio 2015. This will also install DNVM and the associated executables.

Building

The boilerplate includes a Makefile for performing some common operations on the project source using the different binaries available in DNVM. While you're absolutely free to ditch the build system and simply use binaries like dnx and dnu manually, it is recommended that you stick to the build system for the sake of consistency.

⚠️ OBS: Windows users must install something similar to MinGW in order to use make.

Targets

make [target]

packages - Install required NuGet packages using DNU.

build - Build assemblies for applications and test specifications using DNU.

run - Run applications using DNX.

test - Run test specifications using DNX and xUnit.


Copyright © 2015-2016 Kasper Kronborg Isager. Licensed under the terms of the MIT license.

About

Cross-platform DNX-based C# boilerplate configured with xUnit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages