DNX: C#: Reflection

As you may know, Microsoft is getting into the open source community with the ASP.NET and DNX with the mono project.
The .NET Execution Environment (DNX) is a software development kit which allows you to run .NET applications on Windows, Mac, and Linux using different frameworks such as .NET framework, .NET Core, and Mono. However, everything are not roses. There are many incomplete libraries, incompatibilities, lack of documentation, and most of the examples such as doing SQL or SOAP do not work depending on which the library targets you are planning to code for. Therefore, I decided to test the basics on all the library targets. I am starting with DNX451.

Reflection seems to be working fine in DNX451 with C#. Below is a code example for those who wish to play with it.

ReflectionExample.cs

using System;
using System.Linq;
using System.Reflection;

namespace ConsoleApp1 {

	public class ReflectionExample {

		public ReflectionExample() {
			
			Console.WriteLine("ReflectionExample()");
			
			// Option 1
			Assembly assm = typeof(ReflectionExample).Assembly;
			Console.WriteLine("Assembly: {0}", assm);
			Console.WriteLine("Assembly Full Name: {0}", assm.FullName);
					
			// Option 2
			var asm = Assembly.GetExecutingAssembly();
			Console.WriteLine("Assembly Full Name: {0}", asm.FullName);
			
			// Getting info
			var asmTypes = asm.GetTypes();
			foreach (var type in asmTypes){
				Console.WriteLine("\tType: " + type.Name);
				
				var properties = type.GetProperties();
				foreach (var prop in properties){
					Console.WriteLine("\t\tProperty: " + prop.Name + " [Type: " + prop.PropertyType + "]");
				}
				
				var fields = type.GetFields();
				foreach (var f in fields){
					Console.WriteLine("\t\tField: " + f.Name);
				}
				
				var methods = type.GetMethods();
				foreach (var m in methods){
					Console.WriteLine("\t\tMethod: "+ m.Name);
				}
				
			}
			
			// Accessing to properties and methods
			var rs = new ReflectionSample() { Name = "Alejandro", Age = 35 };
			var rsType = typeof(ReflectionSample);

			var nameProperty = rsType.GetProperty("Name");
			Console.WriteLine("Property: " + nameProperty.GetValue(rs));

			var ms = rsType.GetMethod("MethodSample");
			ms.Invoke(rs, null);
					
			Console.WriteLine("Methods:");
			MethodInfo[] methodInfos = rsType.GetMethods(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly);
			Console.WriteLine("-> Number of methods: {0}", methodInfos.Length);
			foreach (MethodInfo mi in methodInfos){
				Console.WriteLine("\t-> Name: {0}", mi.Name);
				Console.WriteLine("\t - Number of parameters: {0}", mi.GetParameters().Length);
				if (mi.GetParameters().Length < 1){
					mi.Invoke(rs, null);
				}
				
			}	
			
			// Accessing attributes
			var types = asm.GetTypes().Where(t => t.GetCustomAttributes<ThisClassAttribute>().Count() > 0);
			foreach(var type in types){
				Console.WriteLine("\nClass with ThisClassAttribute: {0}", type.Name);
				
				var methods = type.GetMethods().Where(m => m.GetCustomAttributes<ThisMethodAttribute>().Count() > 0);
				foreach(var method in methods){
					Console.WriteLine("\t Method with ThisMethodAttribute: {0}", method.Name);
				}
			}		
		
		}
		
		[ThisClass]
		public class ReflectionSample{
			
			public string Name { get; set; }
			
			public int Age;
			
			[ThisMethod]
			public void MethodSample(){
				Console.WriteLine("MethodSample()\n\tRun...");
			}
			
			public void MethodSample2(){
				Console.WriteLine("MethodSample2()\n\tRun...");
			}
		}
		
		[AttributeUsage(AttributeTargets.Class)]
		public class ThisClassAttribute : Attribute { }
		
		[AttributeUsage(AttributeTargets.Method)]
		public class ThisMethodAttribute : Attribute { }
		
	}	
		
}

Since the output may varied depending on all the classes you may have in your project, I decided to not include to not include it]

 

Cite this article as: Alejandro G. Carlstein Ramos Mejia, "DNX: C#: Reflection," in Alejandro G. Carlstein Ramos Mejia Blog, August 31, 2015, http://blog.acarlstein.com/?p=3155.
Share
Leave a comment

DNX: C#: Serialization: Binary & SOAP Formatter

As you may know, Microsoft is getting into the open source community with the ASP.NET and DNX with the mono project.
The .NET Execution Environment (DNX) is a software development kit which allows you to run .NET applications on Windows, Mac, and Linux using different frameworks such as .NET framework, .NET Core, and Mono. However, everything are not roses. There are many incomplete libraries, incompatibilities, lack of documentation, and most of the examples such as doing SQL or SOAP do not work depending on which the library targets you are planning to code for. Therefore, I decided to test the basics on all the library targets. I am starting with DNX451.

Only binary serialization seems to be working in DNX451 with C#. SOAP serialization was not included in the library, I am assuming that such library is available for DNXCORE5.
Below is a code example for those who wish to play with it.

Program.cs

using System;

namespace ConsoleApp1 {
	
	public class Program {
		
		public void Main(string[] args){			
			Console.WriteLine("Main()");
			
			displayWhichDnxIsCompilingOn();
			
			serializationExample();
			
		}
		
		private void displayWhichDnxIsCompilingOn(){
			#if DNX451
			Console.WriteLine("Compiled on DNX451: .NET Framework");
			#endif
			
			#if DNXCORE50
			Console.WriteLine("Compiled on DNXCORE50: .NET Core 5");
			#endif						
		}
				
		private void serializationExample(){
			SerializationExample bse = new SerializationExample();						
		}
			
	}
	
}
SerializationExample.cs

using System;
using System.IO;

using System.Runtime.Serialization.Formatters.Binary;

#if DNXCORE50
	// Assuming Soap formatter is available in DNXCORE50
	using System.Runtime.Serialization.Formatters.Soap;
#endif

using System.Runtime.Remoting.Messaging;

namespace ConsoleApp1 {

	class SerializationExample {
		
		public SerializationExample(){
			Console.WriteLine("SerializationExample()");
	
			ComputerModel[] computerModels = getComputerModels();		
			
			var filename = @"/Users/User/Documents/Projects/Visual Studio Projects/Examples/Serialization Example/computer.bin";		
			IRemotingFormatter formatter = new BinaryFormatter();
			saveComputerModelsInFile(filename, computerModels, formatter);
			displayComputerModelsFromFile(filename, formatter);
			
			// There is not SOAP formatter in DNX451 right now, so this code doesn't work.
			// This code need to be tested with DNXCORE50
			#if DNXCORE50
			filename = @"/Users/User/Documents/Projects/Visual Studio Projects/Examples/Serialization Example/computer.soap";
			formatter = new SoapFormatter();					
			saveComputerModelsInFile(filename, computerModels, formatter);
			displayComputerModelsFromFile(filename, formatter);
			#endif
		}
		
		private ComputerModel[] getComputerModels(){
			ComputerModel[] cm = {
				new ComputerModel(1, "MacBook Pro 6.1"),
				new ComputerModel(2, "MacMini")			
			};
			return cm;
		}
	
		private void saveComputerModelsInFile(String filename, ComputerModel[] computerModels, IRemotingFormatter usingFormatter){
			FileStream fs = new FileStream(filename, FileMode.Create);						
			usingFormatter.Serialize(fs, computerModels); 		
			fs.Close();
		}
		
		private void displayComputerModelsFromFile(String filename, IRemotingFormatter usingFormatter){
			
			FileStream fs = new FileStream(filename, FileMode.Open);
			
			ComputerModel[] serializedData = (ComputerModel[]) usingFormatter.Deserialize(fs);
			
			fs.Close();
			
			foreach (ComputerModel cm in serializedData){
				Console.WriteLine("Description: " + cm.description);
			}
		}
		
	}

}

 

 ComputerModel.cs

using System;

[Serializable]
public class ComputerModel {
	
	private int _id;
	private string _description;
	
	public int id {
		get { return _id; }
		set { _id = value; }		
	}
	
	public string description {
		get { return _description; }
		set { _description = value; }
	}
	
	public ComputerModel(){}
	
	public ComputerModel(int id, string description){
		_id = id;
		_description = description;
	}
}


 Output file: computer.bin

 

Cite this article as: Alejandro G. Carlstein Ramos Mejia, "DNX: C#: Serialization: Binary & SOAP Formatter," in Alejandro G. Carlstein Ramos Mejia Blog, August 31, 2015, http://blog.acarlstein.com/?p=3149.
Share
Leave a comment

DNX: C#: Attributes

As you may know, Microsoft is getting into the open source community with the ASP.NET and DNX with the mono project.
The .NET Execution Environment (DNX) is a software development kit which allows you to run .NET applications on Windows, Mac, and Linux using different frameworks such as .NET framework, .NET Core, and Mono. However, everything are not roses. There are many incomplete libraries, incompatibilities, lack of documentation, and most of the examples such as doing SQL or SOAP do not work depending on which the library targets you are planning to code for. Therefore, I decided to test the basics on all the library targets. I am starting with DNX451.

Attributes seems to be working fine in DNX451 with C#. Below is a code example for those who wish to play with it.

Program.cs

using System;

namespace ConsoleApp1 {
	
	public class Program {
		
		public void Main(string[] args){			
			Console.WriteLine("Main()");
			
			displayWhichDnxIsCompilingOn();
                        attributeExample()
                }
		
		private void displayWhichDnxIsCompilingOn(){
			#if DNX451
			Console.WriteLine("Compiled on DNX451: .NET Framework");
			#endif
			
			#if DNXCORE50
			Console.WriteLine("Compiled on DNXCORE50: .NET Core 5");
			#endif						
		}
				
		private void attributeExample(){
			AttributeExample ae = new AttributeExample();  
			ae.printAuthorsUsingAttribute(typeof(ExampleA.ExampleA));			
		}
	}
	
}
AttributeExample.cs

using System;

namespace ConsoleApp1 {
	
	public class AttributeExample {
		
		public AttributeExample(){
			
			Console.WriteLine("AttiruteExample");
			
			
		}
	
		public void printAuthorsUsingAttribute(Type t){
			Console.WriteLine("PrintAuthorsUsingAttribute()");
			
			Console.WriteLine("Authors for {0}", t);
			
			Attribute[] attributes = Attribute.GetCustomAttributes(t);
						
			foreach(Attribute attribute in attributes){
							
				if (attribute is DocAttribute){
										
					DocAttribute doc = (DocAttribute) attribute;
										
					Console.WriteLine("-> Author: {0}", doc.author);
						
				}				
					
			}
						
		}	
		
	}

}
DocAttribute.cs

using System;

[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
public class DocAttribute : Attribute {

    public DocAttribute(string author){
        this.author = author;
    }

    public readonly string author;

}
ExampleA.cs

using System;

namespace ExampleA {

	[Doc("Alejandro")]
	[Doc("Diego")]
	public class ExampleA{
		
		[Doc("Mengano")]	
		public ExampleA(){
			Console.WriteLine("ExampleA()");
		}
		
		[Doc("Matias")]		
		public void sayHello(){
			Console.WriteLine("Hello from ExampleA!");	
		}
		
	}
}
Output:

AGCRM-MacBook-Pro:Examples user$ dnx . me
Main()
Compiled on DNX451: .NET Framework
AttiruteExample
PrintAuthorsUsingAttribute()
Authors for ExampleA.ExampleA
-> Author: Diego
-> Author: Alejandro

 

Cite this article as: Alejandro G. Carlstein Ramos Mejia, "DNX: C#: Attributes," in Alejandro G. Carlstein Ramos Mejia Blog, August 31, 2015, http://blog.acarlstein.com/?p=3147.
Share
Leave a comment

Installing ASP.NET 5 on Mac OSX

These are the full steps with examples so you can install ASP.NET on your Mac OSX and start working.
I include an example of the output you may expect when executing the command lines.

  1. Download and Install Mono: http://www.mono-project.com/download/
  2. Open Terminal so you can use the following command lines.
  3. Install Homebrew: ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
    ==> This script will install:
    /usr/local/bin/brew
    /usr/local/Library/...
    /usr/local/share/man/man1/brew.1
    ==> The following directories will be made group writable:
    /usr/local/.
    ==> The following directories will have their group set to admin:
    /usr/local/.
    
    Press RETURN to continue or any other key to abort
    ==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/.
    Password:
    ==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/.
    ==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
    ==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
    ==> Downloading and installing Homebrew...
    remote: Counting objects: 3707, done.
    remote: Compressing objects: 100% (3542/3542), done.
    remote: Total 3707 (delta 36), reused 513 (delta 26), pack-reused 0
    Receiving objects: 100% (3707/3707), 3.06 MiB | 5.66 MiB/s, done.
    Resolving deltas: 100% (36/36), done.
    From https://github.com/Homebrew/homebrew
     * [new branch]      master     -> origin/master
    HEAD is now at 342e5cb cairo: add with-x11 option
    ==> Installation successful!
    ==> Next steps
    Run `brew help` to get started
  4. Go to root folder: cd ~
  5. Check if .bash_profile, .profile, .bashrc, and .zshrc exists.
    Note: Mac OSX use .bash_profile and .zshrc; however, it doesn’t hurt to create the other bash files.

    1. If they don’t exist, create them. There are two ways:
      1. touch .bash_profile
      2. echo “” > .bash_profile
  6. Install .NET Version Manager (DNVM): curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | sh && source ~/.dnx/dnvm/dnvm.sh
  7. Load DNVM into the environment if it wasn’t loaded already: source dnvm.sh
  8. Check if DNVM is installed: dnvm
        ___  _  ___   ____  ___
       / _ \/ |/ / | / /  |/  /
      / // /    /| |/ / /|_/ / 
     /____/_/|_/ |___/_/  /_/  
    
    .NET Version Manager - Version 1.0.0-beta7-10410
    By Microsoft Open Technologies, Inc.
    
    DNVM can be used to download versions of the .NET Execution Environment and manage which version you are using.
    You can control the URL of the stable and unstable channel by setting the DNX_FEED and DNX_UNSTABLE_FEED variables.
    
    Current feed settings:
    Default Stable: https://www.nuget.org/api/v2
    Default Unstable: https://www.myget.org/F/aspnetvnext/api/v2
    Current Stable Override: <none>
    Current Unstable Override: <none>
    
    Use dnvm [help|-h|-help|--help]  to display help text.
  9. Update DNVM so you can install the .NET Execution Environment (DNX): dnvm upgrade
    Determining latest version
    Latest version is 1.0.0-beta6 
    Downloading dnx-mono.1.0.0-beta6 from https://www.nuget.org/api/v2
    Download: https://www.nuget.org/api/v2/package/dnx-mono/1.0.0-beta6
    ######################################################################## 100.0%
    Installing to /Users/acarlstein/.dnx/runtimes/dnx-mono.1.0.0-beta6
    Adding /Users/acarlstein/.dnx/runtimes/dnx-mono.1.0.0-beta6/bin to process PATH
    Setting alias 'default' to 'dnx-mono.1.0.0-beta6'

Up to know, we have being following similar steps to those provided by Microsoft: http://docs.asp.net/en/latest/getting-started/installing-on-mac.html

Now, we are going to use some extra steps so we can start developing in ASP.NET using the Kestrel web server.

You may have to install the K Version Manager (KVM), if you think you don’t need KVM then skip this steps:

  1. Tap the ASP.NET vNEXT related Git repository: brew tap aspnet/k
    ==> Tapping aspnet/k
    Cloning into '/usr/local/Library/Taps/aspnet/homebrew-k'...
    remote: Counting objects: 7, done.
    remote: Compressing objects: 100% (7/7), done.
    remote: Total 7 (delta 1), reused 2 (delta 0), pack-reused 0
    Unpacking objects: 100% (7/7), done.
    Checking connectivity... done.
    Tapped 2 formulae (33 files, 136K)
  2. Install the K Version Manager (KVM): brew install kvm
    ==&gt; Installing kvm from aspnet/homebrew-k
    ==&gt; Installing aspnet/k/kvm dependency: mono
    ==&gt; Downloading https://homebrew.bintray.com/bottles/mono-4.0.2.5.yosemite.bottl
    ######################################################################## 100.0%
    ==&gt; Pouring mono-4.0.2.5.yosemite.bottle.1.tar.gz
    ==&gt; Caveats
    To use the assemblies from other formulae you need to set:
      export MONO_GAC_PREFIX=&quot;/usr/local&quot;
    ==&gt; Summary
    &#x1f37a;  /usr/local/Cellar/mono/4.0.2.5: 1006 files, 178M
    ==&gt; Installing aspnet/k/kvm
    ==&gt; Cloning https://github.com/aspnet/Home.git
    Cloning into &#039;/Library/Caches/Homebrew/kvm--git&#039;...
    remote: Counting objects: 32, done.
    remote: Compressing objects: 100% (26/26), done.
    remote: Total 32 (delta 2), reused 23 (delta 2), pack-reused 0
    Unpacking objects: 100% (32/32), done.
    Checking connectivity... done.
    Note: checking out &#039;8ec209d022c38c9f83324375b98caf54be12d659&#039;.
    
    You are in &#039;detached HEAD&#039; state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.
    
    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:
    
      git checkout -b new_branch_name
    
    ==&gt; Checking out tag v1.0.0-beta3
    ==&gt; bash -c &#039;source /usr/local/Cellar/kvm/1.0.0-beta3/libexec/kvm.sh; kvm upgrad
    ==&gt; Caveats
    Add the following to the ~/.bash_profile, ~/.bashrc or ~/.zshrc file:
    
      source kvm.sh
    
    ==&gt; Summary
    &#x1f37a;  /usr/local/Cellar/kvm/1.0.0-beta3: 4 files, 44K, built in 5 seconds
  3. Get a summary of the instralled packages: brew info kvm
    aspnet/k/kvm: stable 1.0.0-beta3, HEAD
    https://www.github.com/aspnet/Home
    /usr/local/Cellar/kvm/1.0.0-beta3 (4 files, 44K) *
      Built from source
    From: https://github.com/aspnet/homebrew-k/blob/master/kvm.rb
    ==> Dependencies
    Recommended: mono ✔
    ==> Options
    --without-mono
    	Build without mono support
    --HEAD
    	Install HEAD version
    ==> Caveats
  4. Load KVM into the environment: source kvm.sh
  5. Upgrate KVM: kvm upgrade
    source kvm.sh
    Alejandro-Carlstein-Ramos-Mejias-MacBook-Pro:~ acarlstein$ source kvm.sh
    Alejandro-Carlstein-Ramos-Mejias-MacBook-Pro:~ acarlstein$ kvm upgrade
    Determining latest version
    Latest version is 1.0.0-beta3
    Downloading kre-mono.1.0.0-beta3 from https://www.nuget.org/api/v2
    Installing to /Users/acarlstein/.k/runtimes/kre-mono.1.0.0-beta3
    Adding /Users/acarlstein/.k/runtimes/kre-mono.1.0.0-beta3/bin to process PATH
    Setting alias 'default' to 'kre-mono.1.0.0-beta3'

Now, we are going to install Yeoman, which is an open source scaffolding tool and the ASP.NET Yeoman generators.
Note: Some of these steps may need to use the command line ‘sudo’.

  1. Install Yeoman using npm: sudo npm install -global yo
    Password:
     
    > spawn-sync@1.0.13 postinstall /usr/local/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync
    > node postinstall
    
    /usr/local/bin/yo -> /usr/local/lib/node_modules/yo/lib/cli.js
    
    > yo@1.4.7 postinstall /usr/local/lib/node_modules/yo
    > yodoctor
    
    
    Yeoman Doctor
    Running sanity checks on your system
    
    ✔ Global configuration file is valid
    ✔ NODE_PATH matches the npm root
    ✔ Node.js version
    ✔ No .bowerrc file in home directory
    ✔ No .yo-rc.json file in home directory
    ✔ npm version
    
    Everything looks all right!
    yo@1.4.7 /usr/local/lib/node_modules/yo
    ├── titleize@1.0.0
    ├── array-uniq@1.0.2
    ├── figures@1.3.5
    ├── user-home@1.1.1
    ├── async@1.4.2
    ├── opn@1.0.2
    ├── humanize-string@1.0.1 (decamelize@1.0.0)
    ├── sort-on@1.2.2 (arrify@1.0.0, dot-prop@2.2.0)
    ├── yeoman-character@1.0.1 (supports-color@1.3.1)
    ├── string-length@1.0.1 (strip-ansi@3.0.0)
    ├── chalk@1.1.0 (escape-string-regexp@1.0.3, supports-color@2.0.0, ansi-styles@2.1.0, has-ansi@2.0.0, strip-ansi@3.0.0)
    ├── findup@0.1.5 (commander@2.1.0, colors@0.6.2)
    ├── repeating@1.1.3 (is-finite@1.0.1)
    ├── meow@3.3.0 (object-assign@3.0.0, minimist@1.1.3, camelcase-keys@1.0.0, indent-string@1.2.2)
    ├── root-check@1.0.0 (downgrade-root@1.1.0, sudo-block@1.2.0)
    ├── yosay@1.0.5 (ansi-regex@1.1.1, ansi-styles@2.1.0, word-wrap@1.1.0, pad-component@0.0.1, strip-ansi@2.0.1, minimist@1.1.3, taketalk@1.0.0, string-width@1.0.1)
    ├── configstore@1.2.1 (os-tmpdir@1.0.1, object-assign@3.0.0, graceful-fs@4.1.2, uuid@2.0.1, xdg-basedir@2.0.0, osenv@0.1.3, write-file-atomic@1.1.2, mkdirp@0.5.1)
    ├── update-notifier@0.5.0 (is-npm@1.0.0, latest-version@1.0.1, semver-diff@2.0.0)
    ├── npm-keyword@1.2.0 (registry-url@3.0.3)
    ├── package-json@1.2.0 (registry-url@3.0.3)
    ├── got@3.3.1 (lowercase-keys@1.0.0, is-stream@1.0.1, timed-out@2.0.0, is-redirect@1.0.0, prepend-http@1.0.2, object-assign@3.0.0, infinity-agent@2.0.3, nested-error-stacks@1.0.1, read-all-stream@3.0.1, duplexify@3.4.2)
    ├── fullname@1.1.0 (npmconf@2.1.2)
    ├── cross-spawn@0.4.1 (lru-cache@2.6.5, spawn-sync@1.0.13)
    ├── yeoman-environment@1.2.7 (log-symbols@1.0.2, escape-string-regexp@1.0.3, diff@1.4.0, text-table@0.2.0, untildify@2.1.0, debug@2.2.0, mem-fs@1.1.0, globby@2.1.0, grouped-queue@0.3.0)
    ├── insight@0.6.0 (object-assign@2.1.1, async@0.9.2, lodash.debounce@3.1.1, os-name@1.0.3, tough-cookie@1.2.0, request@2.60.0)
    ├── lodash@3.10.1
    ├── yeoman-doctor@1.4.0 (object-values@1.0.0, log-symbols@1.0.2, each-async@1.1.1, semver@4.3.6, bin-version-check@2.1.0, twig@0.8.2)
    └── inquirer@0.8.5 (ansi-regex@1.1.1, cli-width@1.0.1, through@2.3.8, readline2@0.1.1, rx@2.5.3)
  2. Install Yeoman’s ASP.NET Generators: sudo npm install -g generator-aspnet
    generator-aspnet@0.0.60 /usr/local/lib/node_modules/generator-aspnet
    ├── vs_projectname@1.0.2
    ├── uuid@2.0.1
    ├── chalk@1.1.0 (escape-string-regexp@1.0.3, supports-color@2.0.0, ansi-styles@2.1.0, has-ansi@2.0.0, strip-ansi@3.0.0)
    ├── chai@1.10.0 (assertion-error@1.0.0, deep-eql@0.1.3)
    ├── yosay@1.0.5 (ansi-regex@1.1.1, ansi-styles@2.1.0, word-wrap@1.1.0, strip-ansi@2.0.1, pad-component@0.0.1, minimist@1.1.3, taketalk@1.0.0, string-width@1.0.1, repeating@1.1.3)
    └── yeoman-generator@0.19.2 (read-chunk@1.0.1, detect-conflict@1.0.0, yeoman-welcome@1.0.1, xdg-basedir@1.0.1, user-home@1.1.1, diff@1.4.0, rimraf@2.4.2, text-table@0.2.0, mime@1.3.4, dargs@4.0.1, async@0.9.2, debug@2.2.0, cross-spawn@0.2.9, istextorbinary@1.0.2, nopt@3.0.3, run-async@0.1.0, mkdirp@0.5.1, shelljs@0.4.0, mem-fs-editor@1.2.3, through2@0.6.5, cli-table@0.3.1, pretty-bytes@1.0.4, dateformat@1.0.11, underscore.string@3.1.1, glob@5.0.14, findup-sync@0.2.1, github-username@1.1.1, class-extend@0.1.1, yeoman-assert@1.0.0, yeoman-environment@1.2.7, download@4.2.0, html-wiring@1.2.0, gruntfile-editor@1.0.0, lodash@3.10.1, sinon@1.15.4, inquirer@0.8.5)
  3. Test if Yeoman is working: yo aspnet
    ? ==========================================================================
    We're constantly looking for ways to make yo better! 
    May we anonymously report usage statistics to improve the tool over time? 
    More info: https://github.com/yeoman/insight & http://yeoman.io
    ========================================================================== Yes
     Y
         _-----_
        |       |    .--------------------------.
        |--(o)--|    |      Welcome to the      |
       `---------´   |   marvellous ASP.NET 5   |
        ( _´U`_ )    |        generator!        |
        /___A___\    '--------------------------'
         |  ~  |     
       __'.___.'__   
     ´   `  |° ´ Y ` 
    
    ? What type of application do you want to create? 
      Empty Application 
      Console Application 
      Web Application 
    ❯ Web Application Basic [without Membership and Authorization] 
      Web API Application 
      Nancy ASP.NET Application 
      Class Library 
      Unit test project
  4. Go to your folder project
  5. Create your project using Yeoman

The following is an example of what happens when you use Yeoman.
I decided to create a Web Application (with Membership and Authorization):

  1. Execute Yeoman: yo aspnet
    ? ==========================================================================
    We're constantly looking for ways to make yo better! 
    May we anonymously report usage statistics to improve the tool over time? 
    More info: https://github.com/yeoman/insight & http://yeoman.io
    ========================================================================== Yes
     Y
         _-----_
        |       |    .--------------------------.
        |--(o)--|    |      Welcome to the      |
       `---------´   |   marvellous ASP.NET 5   |
        ( _´U`_ )    |        generator!        |
        /___A___\    '--------------------------'
         |  ~  |     
       __'.___.'__   
     ´   `  |° ´ Y ` 
    
    ? What type of application do you want to create? 
      Empty Application 
      Console Application 
     ❯ Web Application 
      Web Application Basic [without Membership and Authorization] 
      Web API Application 
      Nancy ASP.NET Application 
      Class Library 
      Unit test project
         _-----_
        |       |    .--------------------------.
        |--(o)--|    |      Welcome to the      |
       `---------´   |   marvellous ASP.NET 5   |
        ( _´U`_ )    |        generator!        |
        /___A___\    '--------------------------'
    ? What's the name of your ASP.NET application? WebApplicationTes
       create WebApplicationTes/gulpfile.js
       create WebApplicationTes/.bowerrc
       create WebApplicationTes/.gitignore
       create WebApplicationTes/bower.json
       create WebApplicationTes/config.json
       create WebApplicationTes/hosting.ini
       create WebApplicationTes/package.json
       create WebApplicationTes/project.json
       create WebApplicationTes/README.md
       create WebApplicationTes/Startup.cs
       create WebApplicationTes/Controllers/AccountController.cs
       create WebApplicationTes/Controllers/HomeController.cs
       create WebApplicationTes/Controllers/ManageController.cs
       create WebApplicationTes/Migrations/00000000000000_CreateIdentitySchema.Designer.cs
       create WebApplicationTes/Migrations/00000000000000_CreateIdentitySchema.cs
       create WebApplicationTes/Migrations/ApplicationDbContextModelSnapshot.cs
       create WebApplicationTes/Models/AccountViewModels.cs
       create WebApplicationTes/Models/IdentityModels.cs
       create WebApplicationTes/Models/ManageViewModels.cs
       create WebApplicationTes/Services/MessageServices.cs
       create WebApplicationTes/Views/_ViewImports.cshtml
       create WebApplicationTes/Views/_ViewStart.cshtml
       create WebApplicationTes/Views/Account/ConfirmEmail.cshtml
       create WebApplicationTes/Views/Account/ExternalLoginConfirmation.cshtml
       create WebApplicationTes/Views/Account/ExternalLoginFailure.cshtml
       create WebApplicationTes/Views/Account/ForgotPassword.cshtml
       create WebApplicationTes/Views/Account/ForgotPasswordConfirmation.cshtml
       create WebApplicationTes/Views/Account/Lockout.cshtml
       create WebApplicationTes/Views/Account/Login.cshtml
       create WebApplicationTes/Views/Account/Register.cshtml
       create WebApplicationTes/Views/Account/ResetPassword.cshtml
       create WebApplicationTes/Views/Account/ResetPasswordConfirmation.cshtml
       create WebApplicationTes/Views/Account/SendCode.cshtml
       create WebApplicationTes/Views/Account/VerifyCode.cshtml
       create WebApplicationTes/Views/Home/About.cshtml
       create WebApplicationTes/Views/Home/Contact.cshtml
       create WebApplicationTes/Views/Home/Index.cshtml
       create WebApplicationTes/Views/Manage/AddPhoneNumber.cshtml
       create WebApplicationTes/Views/Manage/ChangePassword.cshtml
       create WebApplicationTes/Views/Manage/Index.cshtml
       create WebApplicationTes/Views/Manage/ManageLogins.cshtml
       create WebApplicationTes/Views/Manage/RemoveLogin.cshtml
       create WebApplicationTes/Views/Manage/SetPassword.cshtml
       create WebApplicationTes/Views/Manage/VerifyPhoneNumber.cshtml
       create WebApplicationTes/Views/Shared/_Layout.cshtml
       create WebApplicationTes/Views/Shared/_LoginPartial.cshtml
       create WebApplicationTes/Views/Shared/_ValidationScriptsPartial.cshtml
       create WebApplicationTes/Views/Shared/Error.cshtml
       create WebApplicationTes/wwwroot/css/site.css
       create WebApplicationTes/wwwroot/favicon.ico
       create WebApplicationTes/wwwroot/images/ASP-NET-Banners-01.png
       create WebApplicationTes/wwwroot/images/ASP-NET-Banners-02.png
       create WebApplicationTes/wwwroot/images/Banner-01-Azure.png
       create WebApplicationTes/wwwroot/images/Banner-02-VS.png
       create WebApplicationTes/wwwroot/js/site.js
    
    
    Your project is now created, you can use the following commands to get going
        cd "WebApplicationTes"
        dnu restore
        dnu build (optional, build will also happen when it's run)
        dnx . run for console projects
        dnx . kestrel or dnx . web for web projects
    
    
    Alejandro-Carlstein-Ramos-Mejias-MacBook-Pro:Test Two acarlstein$ cd WebApplicationTes/
    Alejandro-Carlstein-Ramos-Mejias-MacBook-Pro:WebApplicationTes acarlstein$ dnu restore
    Microsoft .NET Development Utility Mono-x64-1.0.0-beta6-12256
    
    Restoring packages for /Users/acarlstein/Documents/Projects/Visual Studio Projects/Test Two/WebApplicationTes/project.json
    GET https://www.nuget.org/api/v2/
    OK https://www.nuget.org/api/v2/ 495ms
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='EntityFramework.InMemory'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='EntityFramework.Commands'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Mvc.TagHelpers'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Cookies'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Facebook'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Google'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.MicrosoftAccount'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Authentication.Twitter'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Diagnostics'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Diagnostics.Entity'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Identity.EntityFramework'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.IIS'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.WebListener'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.StaticFiles'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Tooling.Razor'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.Abstractions'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.Json'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.UserSecrets'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging.Console'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNet.Server.Kestrel'
    GET https://www.nuget.org/api/v2/FindPackagesById()?id='Kestrel'
    ...
    Installing Microsoft.Framework.Configuration.Abstractions.1.0.0-beta6
    Installing Microsoft.Framework.Configuration.UserSecrets.1.0.0-beta6
    Installing Microsoft.AspNet.Server.Kestrel.1.0.0-beta6
    Installing Microsoft.Framework.Runtime.Abstractions.1.0.0-beta6
    Installing Microsoft.Framework.Logging.1.0.0-beta6
    Installing Microsoft.Framework.DependencyInjection.Abstractions.1.0.0-beta6
    Installing Microsoft.Framework.Logging.Abstractions.1.0.0-beta6
    Installing Microsoft.Framework.Logging.Console.1.0.0-beta6
    Installing Microsoft.Framework.Configuration.Json.1.0.0-beta6
    Installing Newtonsoft.Json.6.0.6
    Installing Microsoft.Framework.Configuration.1.0.0-beta6
    Installing Microsoft.AspNet.Tooling.Razor.1.0.0-beta6
    Installing Microsoft.AspNet.Razor.Runtime.4.0.0-beta6
    Installing Microsoft.AspNet.Razor.4.0.0-beta6
    Installing Microsoft.AspNet.Html.Abstractions.1.0.0-beta6
    Installing Microsoft.Framework.WebEncoders.Core.1.0.0-beta6
    Installing EntityFramework.InMemory.7.0.0-beta6
    Installing EntityFramework.Core.7.0.0-beta6
    Installing Microsoft.Framework.Caching.Memory.1.0.0-beta6
    Installing Microsoft.Framework.DependencyInjection.1.0.0-beta6
    Installing Ix-Async.1.2.4
    Installing Microsoft.Framework.Caching.Abstractions.1.0.0-beta6
    Installing Remotion.Linq.2.0.0-alpha-004
    Installing System.Collections.Immutable.1.1.37-beta-23109
    Installing System.Runtime.4.0.0-beta-23109
    Installing System.Resources.ResourceManager.4.0.0-beta-23109
    Installing System.Diagnostics.Debug.4.0.0-beta-23109
    Installing System.Collections.4.0.0-beta-23109
    Installing System.Linq.4.0.0-beta-23109
    Installing System.Runtime.Extensions.4.0.0-beta-23109
    ...
    Writing lock file /Users/acarlstein/Documents/Projects/Visual Studio Projects/Test Two/WebApplicationTes/project.lock.json
    Restore complete, 37542ms elapsed
    
    NuGet Config files used:
        /Users/acarlstein/.config/NuGet/NuGet.Config
    
    Feeds used:
        https://www.nuget.org/api/v2/
    
    Installed:
        200 package(s) to /Users/acarlstein/.dnx/packages
  2. (optional) DNVM is the continuation of KVM; however, if you are encouting troubles try to check the dependencies using KVM: kpm restore
    Restoring packages for /Users/acarlstein/Documents/Projects/Visual Studio Projects/Test Two/WebApplicationTes/project.json
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='EntityFramework.InMemory'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='EntityFramework.Commands'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Mvc'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Mvc.TagHelpers'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Authentication.Cookies'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Authentication.Facebook'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Authentication.Google'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Authentication.MicrosoftAccount'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Authentication.Twitter'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Diagnostics'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Diagnostics.Entity'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Identity.EntityFramework'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Server.IIS'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Server.WebListener'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.StaticFiles'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Tooling.Razor'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Configuration.Abstractions'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Configuration.Json'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Configuration.UserSecrets'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Logging'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Logging.Console'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Server.Kestrel'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Kestrel'.
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Configuration.UserSecrets' 1198ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Configuration.Abstractions' 1199ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Configuration.Json' 1199ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Authentication.Facebook' 1499ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Authentication.Google' 7549ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Tooling.Razor' 8047ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Authentication.Twitter' 14110ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Authentication.MicrosoftAccount' 14616ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Authentication.Cookies' 15122ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='EntityFramework.Commands' 21189ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Server.WebListener' 21679ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Mvc.TagHelpers' 27740ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Kestrel' 28235ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Diagnostics' 28747ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Logging' 29251ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='EntityFramework.InMemory' 29860ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Server.IIS' 35804ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Diagnostics.Entity' 36310ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.StaticFiles' 36811ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Server.Kestrel' 42850ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Logging.Console' 43356ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Identity.EntityFramework' 43866ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Mvc' 44377ms
      GET https://www.nuget.org/api/v2/package/Microsoft.Framework.Logging.Console/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/EntityFramework.InMemory/7.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Server.Kestrel/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Identity.EntityFramework/3.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Mvc.TagHelpers/6.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.Framework.Configuration.UserSecrets/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Authentication.Cookies/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Authentication.Facebook/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Server.IIS/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Authentication.Twitter/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Diagnostics/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Mvc/6.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Tooling.Razor/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Authentication.MicrosoftAccount/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Authentication.Google/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.Framework.Logging/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Diagnostics.Entity/7.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.Framework.Configuration.Json/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Kestrel/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/EntityFramework.Commands/7.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Server.WebListener/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.StaticFiles/1.0.0-beta6.
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Authentication.MicrosoftAccount/1.0.0-beta6 277ms
      OK https://www.nuget.org/api/v2/package/Microsoft.Framework.Configuration.UserSecrets/1.0.0-beta6 332ms
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Identity.EntityFramework/3.0.0-beta6 363ms
      OK https://www.nuget.org/api/v2/package/Kestrel/1.0.0-beta6 358ms
      OK https://www.nuget.org/api/v2/package/Microsoft.Framework.Logging/1.0.0-beta6 432ms
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.DependencyInjection.Abstractions'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Logging.Abstractions'.
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Mvc/6.0.0-beta6 449ms
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Tooling.Razor/1.0.0-beta6 456ms
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Diagnostics.Entity/7.0.0-beta6 462ms
      OK https://www.nuget.org/api/v2/package/Microsoft.Framework.Configuration.Json/1.0.0-beta6 470ms
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Newtonsoft.Json'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Configuration'.
      OK https://www.nuget.org/api/v2/package/EntityFramework.InMemory/7.0.0-beta6 485ms
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='EntityFramework.Core'.
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Authentication.Facebook/1.0.0-beta6 498ms
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Server.IIS/1.0.0-beta6 501ms
      OK https://www.nuget.org/api/v2/package/Microsoft.Framework.Logging.Console/1.0.0-beta6 510ms
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Loader.IIS.Interop'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Loader.IIS'.
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Server.WebListener/1.0.0-beta6 532ms
      OK https://www.nuget.org/api/v2/package/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta6 547ms
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Mvc.TagHelpers/6.0.0-beta6 578ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.DependencyInjection.Abstractions' 135ms
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Authentication.Google/1.0.0-beta6 573ms
      GET https://www.nuget.org/api/v2/package/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta6.
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Logging.Abstractions' 141ms
      GET https://www.nuget.org/api/v2/package/Microsoft.Framework.Logging.Abstractions/1.0.0-beta6.
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Configuration' 114ms
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Authentication.Cookies/1.0.0-beta6 595ms
      GET https://www.nuget.org/api/v2/package/Microsoft.Framework.Configuration/1.0.0-beta6.
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.StaticFiles/1.0.0-beta6 619ms
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Diagnostics/1.0.0-beta6 659ms
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Authentication.Twitter/1.0.0-beta6 662ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='EntityFramework.Core' 194ms
      GET https://www.nuget.org/api/v2/package/EntityFramework.Core/7.0.0-beta6.
      OK https://www.nuget.org/api/v2/package/EntityFramework.Commands/7.0.0-beta6 697ms
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='EntityFramework.Relational.Design'.
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Newtonsoft.Json' 247ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Loader.IIS.Interop' 221ms
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Loader.IIS.Interop/1.0.0-beta6.
      OK https://www.nuget.org/api/v2/package/Microsoft.Framework.Configuration/1.0.0-beta6 140ms
      GET https://www.nuget.org/api/v2/package/Newtonsoft.Json/6.0.6.
      OK https://www.nuget.org/api/v2/package/Microsoft.Framework.Logging.Abstractions/1.0.0-beta6 171ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Loader.IIS' 250ms
      OK https://www.nuget.org/api/v2/package/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta6 184ms
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Loader.IIS/1.0.0-beta6.
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Server.Kestrel/1.0.0-beta6 783ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='EntityFramework.Relational.Design' 117ms
      GET https://www.nuget.org/api/v2/package/EntityFramework.Relational.Design/7.0.0-beta6.
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Loader.IIS.Interop/1.0.0-beta6 258ms
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Loader.IIS/1.0.0-beta6 344ms
      OK https://www.nuget.org/api/v2/package/EntityFramework.Core/7.0.0-beta6 429ms
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Ix-Async'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Caching.Abstractions'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Caching.Memory'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.DependencyInjection'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.OptionsModel'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Remotion.Linq'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='System.Collections.Immutable'.
      OK https://www.nuget.org/api/v2/package/EntityFramework.Relational.Design/7.0.0-beta6 325ms
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Razor'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.CodeAnalysis.CSharp'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='EntityFramework.Relational'.
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Ix-Async' 59ms
      GET https://www.nuget.org/api/v2/package/Ix-Async/1.2.4.
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Caching.Memory' 90ms
      GET https://www.nuget.org/api/v2/package/Microsoft.Framework.Caching.Memory/1.0.0-beta6.
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.DependencyInjection' 92ms
      GET https://www.nuget.org/api/v2/package/Microsoft.Framework.DependencyInjection/1.0.0-beta6.
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Caching.Abstractions' 114ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='System.Collections.Immutable' 113ms
      GET https://www.nuget.org/api/v2/package/Microsoft.Framework.Caching.Abstractions/1.0.0-beta6.
      GET https://www.nuget.org/api/v2/package/System.Collections.Immutable/1.1.37-beta-23109.
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.OptionsModel' 140ms
      GET https://www.nuget.org/api/v2/package/Microsoft.Framework.OptionsModel/1.0.0-beta6.
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='EntityFramework.Relational' 121ms
      GET https://www.nuget.org/api/v2/package/EntityFramework.Relational/7.0.0-beta6.
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Remotion.Linq' 179ms
      GET https://www.nuget.org/api/v2/package/Remotion.Linq/2.0.0-alpha-004.
      OK https://www.nuget.org/api/v2/package/Microsoft.Framework.DependencyInjection/1.0.0-beta6 141ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.CodeAnalysis.CSharp' 212ms
      GET https://www.nuget.org/api/v2/package/Microsoft.CodeAnalysis.CSharp/1.0.0.
      OK https://www.nuget.org/api/v2/package/Microsoft.Framework.Caching.Abstractions/1.0.0-beta6 160ms
      OK https://www.nuget.org/api/v2/package/Microsoft.Framework.Caching.Memory/1.0.0-beta6 285ms
      OK https://www.nuget.org/api/v2/package/Microsoft.Framework.OptionsModel/1.0.0-beta6 236ms
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Configuration.Binder'.
      OK https://www.nuget.org/api/v2/package/System.Collections.Immutable/1.1.37-beta-23109 314ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Razor' 435ms
      OK https://www.nuget.org/api/v2/package/Ix-Async/1.2.4 419ms
      GET https://www.nuget.org/api/v2/package/Microsoft.AspNet.Razor/4.0.0-beta6.
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.Framework.Configuration.Binder' 110ms
      GET https://www.nuget.org/api/v2/package/Microsoft.Framework.Configuration.Binder/1.0.0-beta6.
      OK https://www.nuget.org/api/v2/package/EntityFramework.Relational/7.0.0-beta6 450ms
      OK https://www.nuget.org/api/v2/package/Microsoft.Framework.Configuration.Binder/1.0.0-beta6 175ms
      OK https://www.nuget.org/api/v2/package/Newtonsoft.Json/6.0.6 1094ms
      OK https://www.nuget.org/api/v2/package/Microsoft.AspNet.Razor/4.0.0-beta6 265ms
      OK https://www.nuget.org/api/v2/package/Remotion.Linq/2.0.0-alpha-004 573ms
      OK https://www.nuget.org/api/v2/package/Microsoft.CodeAnalysis.CSharp/1.0.0 1273ms
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.CodeAnalysis.Common'.
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.CodeAnalysis.Common' 150ms
      GET https://www.nuget.org/api/v2/package/Microsoft.CodeAnalysis.Common/1.0.0.
      OK https://www.nuget.org/api/v2/package/Microsoft.CodeAnalysis.Common/1.0.0 641ms
      GET https://www.nuget.org/api/v2/package/System.Collections.Immutable/1.1.36.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='System.Reflection.Metadata'.
      GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.CodeAnalysis.Analyzers'.
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='System.Reflection.Metadata' 66ms
      OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.CodeAnalysis.Analyzers' 67ms
      GET https://www.nuget.org/api/v2/package/System.Reflection.Metadata/1.0.21.
      GET https://www.nuget.org/api/v2/package/Microsoft.CodeAnalysis.Analyzers/1.0.0.
      OK https://www.nuget.org/api/v2/package/System.Collections.Immutable/1.1.36 100ms
      OK https://www.nuget.org/api/v2/package/System.Reflection.Metadata/1.0.21 98ms
      OK https://www.nuget.org/api/v2/package/Microsoft.CodeAnalysis.Analyzers/1.0.0 117ms
    Resolving complete, 48996ms elapsed
    Installing Microsoft.AspNet.Authentication.MicrosoftAccount 1.0.0-beta6
    Installing Microsoft.Framework.Configuration.UserSecrets 1.0.0-beta6
    Installing Microsoft.AspNet.Identity.EntityFramework 3.0.0-beta6
    Installing Kestrel 1.0.0-beta6
    Installing Microsoft.AspNet.Mvc 6.0.0-beta6
    Installing Microsoft.AspNet.Tooling.Razor 1.0.0-beta6
    Installing Microsoft.AspNet.Diagnostics.Entity 7.0.0-beta6
    Installing Microsoft.AspNet.Authentication.Facebook 1.0.0-beta6
    Installing Microsoft.AspNet.Server.WebListener 1.0.0-beta6
    Installing Microsoft.Framework.Configuration.Abstractions 1.0.0-beta6
    Installing Microsoft.AspNet.Mvc.TagHelpers 6.0.0-beta6
    Installing Microsoft.AspNet.Authentication.Google 1.0.0-beta6
    Installing Microsoft.AspNet.Authentication.Cookies 1.0.0-beta6
    Installing Microsoft.AspNet.StaticFiles 1.0.0-beta6
    Installing Microsoft.AspNet.Diagnostics 1.0.0-beta6
    Installing Microsoft.AspNet.Authentication.Twitter 1.0.0-beta6
    Installing Microsoft.Framework.Logging.Console 1.0.0-beta6
    Installing Microsoft.Framework.Logging.Abstractions 1.0.0-beta6
    Installing Microsoft.Framework.Logging 1.0.0-beta6
    Installing Microsoft.Framework.DependencyInjection.Abstractions 1.0.0-beta6
    Installing Microsoft.AspNet.Server.Kestrel 1.0.0-beta6
    Installing Microsoft.AspNet.Server.IIS 1.0.0-beta6
    Installing Microsoft.AspNet.Loader.IIS.Interop 1.0.0-beta6
    Installing Microsoft.AspNet.Loader.IIS 1.0.0-beta6
    Installing Microsoft.Framework.Configuration.Json 1.0.0-beta6
    Installing Microsoft.Framework.Configuration 1.0.0-beta6
    Installing Newtonsoft.Json 6.0.6
    Installing EntityFramework.InMemory 7.0.0-beta6
    Installing EntityFramework.Core 7.0.0-beta6
    Installing Microsoft.Framework.DependencyInjection 1.0.0-beta6
    Installing Microsoft.Framework.Caching.Abstractions 1.0.0-beta6
    Installing Microsoft.Framework.Caching.Memory 1.0.0-beta6
    Installing System.Collections.Immutable 1.1.37-beta-23109
    Installing Ix-Async 1.2.4
    Installing Microsoft.Framework.OptionsModel 1.0.0-beta6
    Installing Microsoft.Framework.Configuration.Binder 1.0.0-beta6
    Installing Remotion.Linq 2.0.0-alpha-004
    Installing EntityFramework.Commands 7.0.0-beta6
    Installing EntityFramework.Relational.Design 7.0.0-beta6
    Installing Microsoft.AspNet.Razor 4.0.0-beta6
    Installing EntityFramework.Relational 7.0.0-beta6
    Installing Microsoft.CodeAnalysis.CSharp 1.0.0
    Installing Microsoft.CodeAnalysis.Common 1.0.0
    Installing System.Collections.Immutable 1.1.36
    Installing System.Reflection.Metadata 1.0.21
    Installing Microsoft.CodeAnalysis.Analyzers 1.0.0
    Restore complete, 49927ms elapsed
  3. Run the Kestrel web server: dnx . kestrel
    info    : [Microsoft.Framework.DependencyInjection.DataProtectionServices] User profile is available. Using ‘/Users/acarlstein/.local/share/ASP.NET/DataProtection-Keys’ as key repository; keys will not be encrypted at rest.

Remember that dnx will execute the command line used in the project.json:

"commands": {
    "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --config hosting.ini",
    "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --config hosting.ini"
  },

 

Works Cited

Steve Smith. “Installing ASP.NET 5 On Mac OS X.” Microsoft. : . Online. http://docs.asp.net/en/latest/getting-started/installing-on-mac.html

Sam Basu. “Write C# on a Mac like a Champ!” Telerik.com. January 12, 2015: . Online. http://developer.telerik.com/featured/write-c-mac-like-champ/

 

Cite this article as: Alejandro G. Carlstein Ramos Mejia, "Installing ASP.NET 5 on Mac OSX," in Alejandro G. Carlstein Ramos Mejia Blog, August 19, 2015, http://blog.acarlstein.com/?p=3073.
Share
Leave a comment