'Microsoft.AspNet.Server.Kestrel'不包含适用于入口点的静态'Main'方法

编程入门 行业动态 更新时间:2024-10-28 21:17:09
本文介绍了'Microsoft.AspNet.Server.Kestrel'不包含适用于入口点的静态'Main'方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试运行最新的 Asp.Net 5示例(当前为1.0.0-rc1-update1)(位于Windows 10上的powershell中).我已将活动DNX和默认DNX设置为CLR x86.我对这3个项目中的每一个都运行了 dnu restore 命令,该操作已成功完成,没有错误.

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.

如果我为控制台示例运行命令 dnx run ,则可以正常运行.但是,当我随后从任何一个Web项目的文件夹中运行命令 dnx web 时,我会收到错误消息;

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'不包含适用于入口点的静态'Main'方法

这些示例非常基础,因此我认为它必须是我的dnx配置的一部分.但是为什么会发生这种情况,我该如何解决呢?

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?

推荐答案

问题的原因实际上是一个奇怪的原因,但看起来 dnu restore 命令区分大小写.我认为这也与必须在Linux上运行有关,但是我不确定.

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.

在powershell中,我当前的路径全是小写字母,但我的文件夹结构却不是.在 webhello 中,如果我运行命令 cd .. \ WebHello 然后运行 dnu restore ,则恢复工作正常,并且dnx web 命令也可以正常运行.

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.

有趣的是,如果我运行 cd .. \ webhello ,则 dnx web 命令仍然可以正常工作.

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

更多推荐

'Microsoft.AspNet.Server.Kestrel'不包含适用于入口点的静态'Main'方法

本文发布于:2023-11-15 12:38:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1594519.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:适用于   静态   不包含   入口   方法

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!