Skip to content

Instantly share code, notes, and snippets.

@bityob
Last active September 7, 2016 18:07
Show Gist options
  • Save bityob/3f42c6725ebc6a2961e90b233b6b888a to your computer and use it in GitHub Desktop.
Save bityob/3f42c6725ebc6a2961e90b233b6b888a to your computer and use it in GitHub Desktop.
How to use and install DNX on VS 2015 Update 2?
1. First install VS update 2
* Download the .iso file
* Uncheck the "Update 3" option
2. How to use ASP.NET 5 Template?
* Use an existing project of ASP.NET 5 as template
(maybe there is another approach or maybe it's no longer an issue after successfully installed the DNX package)
3. How to install the DNX itself?
* In VS, in the Package Manager windows enter: Install-Package dnx-clr-win-x64 -Version 1.0.0-rc1-update1 -Pre
(This will download DNX from nuget:
https://www.nuget.org/packages/dnx-clr-win-x64/1.0.0-rc1-update1,
and install in on the machine in the user directory: C:\Users\<username>\.dnx)
4. How to configure the EF with this DNX?
* Open command line in the *project* folder (not the solution)
* Enter in the cmd:
- set path=%path%;%USERPROFILE%\.dnx\packages\dnx-clr-win-x64\1.0.0-rc1-update1\bin
- dnu restore (only once, first time using/install the db on the machine)
- dnvm use 1.0.0-rc1-update1 -p (only once, the same as above)
- dnx ef migrations add Initial (do it after each changment in the Model,
the name 'Initial' need to be different each time, it's for db versioning)
- dnx ef database update (do it after each changment in the Model, the same as above)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment