I was building dot net core console applications on OSX and ran into an issue where certain core dependencies were not resolving when running dnu build. The error output I would get would be:

Building ConsoleApplication2 for DNX,Version=v4.5.1
  Using Project dependency ConsoleApplication2 1.0.0
    Source: /Users/john/Dev/ConsoleApplication2/project.json

  Unable to resolve dependency fx/mscorlib

  Unable to resolve dependency fx/System

  Unable to resolve dependency fx/System.Core

  Unable to resolve dependency fx/Microsoft.CSharp

After doing some testing, I found that if I specified the core framework (dnxcore50) to the build command, then it would work properly.

dnu build --framework dnxcore50

After doing some more digging, I found that I did not have the mono framework installed on the machine, and thus the v4.5.1 build was failing. To correct this, I simply had to install the mono framework using dnvm:

dnvm upgrade -r mono

After that, the dnu build works properly and I can continue on my way.