How to get the “dnu” command working on OS X?

前端 未结 5 748
生来不讨喜
生来不讨喜 2021-01-30 05:16

Just downloaded and installed Visual Studio Code on OS X 10.10.3.

I\'ve managed to partially follow the installation instructions for ASP.NET 5.

What I fail with

5条回答
  •  日久生厌
    2021-01-30 05:35

    Bit of a noob answer, but it might help someone. If you're on OS X, make sure you follow the instructions carefully! I completely missed some OS X specific instructions under the heading "Installing ASP.NET 5 and DNX". I read the heading and thought "I've already installed this".

    The instructions for OS X points to:

    https://github.com/aspnet/home#os-x

    It says to run the following homebrew commands:

    brew tap aspnet/dnx
    brew update
    brew install dnvm
    

    After this succeeds, the following text is output in the console:

    Add the following to the ~/.bash_profile, ~/.bashrc or ~/.zshrc file:

    source dnvm.sh

    I added it to my .bash_profile and now dnu restore works from my project directory!

    In general, I found the steps on the ASP.NET 5 docs page much clearer than the Visual Studio Code page. Acronyms are explained and screenshots of many steps are present.

    Installing ASP.NET 5 on Mac OS X

    Your First ASP.NET 5 Application on a Mac

提交回复
热议问题