asp.net-core – 入口点没有合适的“程序”类型
看起来每晚RC2版本的最新更新改变了程序启动的方式.自更新以来,我现在在运行以下命令时出现错误.
// "commands": { // "web": "Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:1287" // } dnx --watch web 'Microsoft.AspNet.Server.Kestrel' does not contain a 'Program' type suitable for an entry point Stopped listening. Startup.cs编译并具有以下方法. public class Startup { public void ConfigureServices(IServiceCollection services,IHostingEnvironment env) { ... } public void Configure(IApplicationBuilder app,IApplicationLifetime lifetime) { ... } } 需要做些什么才能让程序启动最新的nightly版本? 这是一个重现问题的例子. https://github.com/roydukkey/moist/tree/stackoverflow-34615917 sdk:v1.0.0-rc2-16357 解决方法
在
aspnet/Hosting#521中,已删除多个入口点.
要解决此问题,命令设置需要指向程序集,而不是列出以前有效的服务器配置.此外,需要启用emitEntryPoint设置.这两个设置都是从??project.json设置的. "compilationOptions": { "emitEntryPoint": true },"commands": { - "web": "Microsoft.AspNet.Server.Kestrel" + "web": "Web" } 特定的服务器配置现在位于hosting.json中.以下仅是示例配置. ?{ "server": "Microsoft.AspNet.Server.Kestrel","server.urls": "http://localhost:1234" } 请参阅roydukkey/moist/tree/stackoverflow-34615917以查看整个问题的工作流程. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- 存储ASP.NET会话变量的最佳解决方案是什么? StateServer还
- asp.net-mvc – 是否可以将XDocument作为参数传递给ASP.NET
- asp.net – 带LinqDataSource的DropDownList和一个空选项
- asp.net-mvc-4 – MVC Razor强类型视图中表行的回发复选框
- asp.net-mvc – 使用ASP.Net MVC中的模型绑定器更新父/子记
- DxPackNet 3.音频捕捉(录音)
- asp.net-mvc – 使用EditorFor时向ModelMetadata.Additiona
- asp.net-mvc – 使用web api和asp.net mvc 5进行单点登录
- asp.net – 如何处理错误时使用jQuery.ajax()?
- asp.net-mvc-3 – .NET MVC – 一次提交多个相同类型的模型