1
votes

I'm learning asp.net 5 by running the github examples, specifically aspnet-Home. Things are good, until I get this error when I run

dnx . web

System.TypeLoadException: Could not load type 'System.ConsoleCancelEventHandler' from assembly 'System.Console, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. at Microsoft.AspNet.Hosting.Program.Main(String[] args)

It happened earlier and a reboot fixed it. Rebooting sucks. Nothing found in Google. Anyone recognize this, and can explain how to resolve?

1
Looks like you're trying to write/call Main method in the web application. Try to create Console Application in the Visual Studio, this kind of application should contain Main method and may to use System.Console class.Mark Shevchenko

1 Answers

1
votes

I had dnvm used the wrong execution environment. That's something I'm still figuring out.