Set up Visual Studio Code on Mac OSX

Step I : Setting up environment 


Download and Install Visual Studio Code from follow link and follow the instruction https://code.visualstudio.com/docs/editor/setup





Install ASP.NET 5 and DNX



Then append these lines to your ~/.bash_profile in your terminal

Run vim ~/.bash_profile

function code() { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $*; }

source dnvm.sh

export MONO_MANAGED_WATCHER=disabled

then

Run :x to save and exit vim.

Run source ~/.bash_profile or restart your terminal then run the following command.

Run dnvm upgrade

Part II : Getting Started




As shown above run following command in your terminal

npm install -g yo generator-aspnet gulp bower



Run yo aspnet

After that you will see like this. There you can choose as shown below.

After that you will see something like (for me I chose ConsoleApplication)


? ==========================================================================
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

     _-----_
    |       |    .--------------------------.
    |--(o)--|    |      Welcome to the      |
   `---------´   |   marvellous ASP.NET 5   |
    ( _´U`_ )    |        generator!        |
    /___A___\    '--------------------------'
     |  ~  |     
   __'.___.'__   
 ´   `  |° ´ Y

? What type of application do you want to create? Console Application
? What's the name of your ASP.NET application? MacNET_Test
   create MacNET_Test/.gitignore
   create MacNET_Test/Program.cs
   create MacNET_Test/project.json


Your project is now created, you can use the following commands to get going
    cd "MacNET_Test"
    dnu restore
    dnu build (optional, build will also happen when it's run)

    dnx run

Then you can follow as mentioned : 

cd "MacNET_Test" //Your project folder.
dnu restore
dnx run or web //based on the application type you chose above. Build will happen when command run)

Run " code . " in your terminal to launch Visual Studio Code.


Please drop me an email or comment. Thank you!!


Popular posts from this blog

npm refusing to install as a dependency of itself

How to call javascript functions from VB.NET and using WebBrowser Control