24

Following the steps described in the Visual Studio Code documentation, running the final command dnx . kestrel via the Command Palette of VSCode on Mac OS X results in an IOException when visiting http://localhost:5001:

kqueue() FileSystemWatcher has reached the maximum nunmber of files to watch.

See the attached screenshot for the complete stacktrace. What could be wrong?enter image description here

DavidG
  • 113,891
  • 12
  • 217
  • 223
hwschuur
  • 1,101
  • 2
  • 13
  • 17

1 Answers1

27

It's a known mono bug. In order to fix it set the MONO_MANAGED_WATCHER environment variable:

export MONO_MANAGED_WATCHER=false

Source

Andrei Zubov
  • 578
  • 4
  • 14
Kyle West
  • 8,934
  • 13
  • 65
  • 97
  • 2
    Thanks, this seems like a step forward… However, another exception is now thrown: TypeLoadException: Could not load type 'Microsoft.Framework.Runtime.ILibraryExport' from assembly 'Microsoft.Framework.Runtime.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. – hwschuur Apr 30 '15 at 17:04
  • 2
    @dbaw It is an exception indicating a version mismatch between your .net version and the version the project dependencies have been built against. You can set up a correct version using dnvm. More information can be found in my [blog post](http://andreizubov.blogspot.ru/2015/04/getting-started-with-net-on-os-x-and.html) – Andrei Zubov Apr 30 '15 at 23:00
  • @AndreiZubov A thousand times yes! The managed_watcher and setting dnvm to use beta 4 active and default did the trick. Thank you! – Myke Bates May 01 '15 at 04:36
  • @AndreiZubov This does the trick. I also had to overrule the DNX_FEED variable with 'export DNX_FEED=https://www.nuget.org/api/v2' and force an dnvm upgrade through 'dnvm upgrade -f' because I was on the unstable channel. But made it to the WebApplication main page, thanks! – hwschuur May 01 '15 at 20:07