Question: 'Microsoft.AspNet.Server.Kestrel' does not contain a static 'Main' method suitable for an entry point

Question

'Microsoft.AspNet.Server.Kestrel' does not contain a static 'Main' method suitable for an entry point

Answers 1
Added at 2016-01-08 12:01
Tags
Question

I'm trying to run the latest Asp.Net 5 samples (currently 1.0.0-rc1-update1) from powershell on Windows 10. I have the active and default DNX set as the CLR x86. I have run the dnu restore command against each of the 3 projects and this has completed without error.

If I run the command dnx run for the console sample this works fine. However, when I then run the command dnx web from within either of the web project's folders I get the error message;

'Microsoft.AspNet.Server.Kestrel' does not contain a static 'Main' method suitable for an entry point

The samples are pretty basic and so I assume it must be part of my dnx configuration. But why is this happening and how do I fix it?

Answers to

'Microsoft.AspNet.Server.Kestrel' does not contain a static 'Main' method suitable for an entry point

nr: #1 dodano: 2016-01-08 16:01

The cause of the issue is a strange one actually but it looks like the dnu restore command is case-sensitive. I assume this has something to do with it having to run on Linux too but I'm not sure.

In powershell my current path was all lowercase but my folder structure wasn't. Whilst in webhello , if I ran the command cd ..\WebHello and then ran dnu restore, the restore worked fine and the dnx web command also then ran fine.

Interestingly, if I ran cd ..\webhello, the dnx web command still works fine.

Source Show
◀ Wstecz