asp.net-core – 无法运行dnx控制台应用程序
发布时间:2020-12-16 07:25:27 所属栏目:asp.Net 来源:网络整理
导读:我已经按照这个 link来运行一个dnx控制台应用程序.我创建了两个文件Program.cs和project.json,其中包含链接中提到的内容 这是我执行的命令序列 F:first-dnx dnvm list Active Version Runtime Architecture OperatingSystem Alias ------ ------- ------- -
我已经按照这个
link来运行一个dnx控制台应用程序.我创建了两个文件Program.cs和project.json,其中包含链接中提到的内容
这是我执行的命令序列 F:first-dnx> dnvm list Active Version Runtime Architecture OperatingSystem Alias ------ ------- ------- ------------ --------------- ----- 1.0.0-beta6 clr x86 win 1.0.0-beta6 coreclr x64 win * 1.0.0-beta8-15530 clr x86 win default F:first-dnx> dnu restore Microsoft .NET Development Utility CLR-x86-1.0.0-beta8-15530 Restoring packages for F:first-dnxproject.json CACHE https://www.myget.org/F/aspnetvnext/api/v2/ CACHE https://www.nuget.org/api/v2/ Writing lock file F:first-dnxproject.lock.json Restore complete,490ms elapsed NuGet Config files used: C:UserssamAppDataRoamingNuGetNuGet.Config Feeds used: https://www.myget.org/F/aspnetvnext/api/v2/ https://www.nuget.org/api/v2/ F:first-dnx> dnu build 该项目已成功构建,但当我尝试运行该应用程序时 F:first-dnx> dnx . run System.InvalidOperationException: Unable to load application or execute command '.'. Available commands: ConsoleApp1. at Microsoft.Dnx.ApplicationHost.Program.ThrowEntryPointNotfoundException(DefaultHost host,String applicationName,Exception innerException) at Microsoft.Dnx.ApplicationHost.Program.ExecuteMain(DefaultHost host,String[] args) at Microsoft.Dnx.ApplicationHost.Program.Main(String[] args) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly,String[] args,IServiceProvider serviceProvider) at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args,IRuntimeEnvironment env,FrameworkName targetFramework) at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args,FrameworkName targetFramework) at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args,FrameworkName targetFramework) F:first-dnx> dnx . ConsoleApp1 System.InvalidOperationException: Unable to load application or execute command '.'. Available commands: ConsoleApp1. at Microsoft.Dnx.ApplicationHost.Program.ThrowEntryPointNotfoundException(DefaultHost host,FrameworkName targetFramework) F:first-dnx> 解决方法
你不必添加.再指定基本路径.尝试:
dnx run 这在beta7中有所改变.见:https://github.com/aspnet/Announcements/issues/52. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc – 我可以创建一个带有MVC3助手的选择列表
- asp.net – 自我跟踪实体vs POCO实体
- asp.net-core – 具有不同root的ASP.Net核心反向代理
- ASP.NET MVC 3:添加控制器时自动生成视图(无实体框架)
- Windbg程序调试系列1-常用命令说明&示例
- 实体框架 – Asp.Net Web API错误:’ObjectContent`1’类型
- asp.net-mvc – 如何从ActionExecuting过滤器中获取路由值?
- asp.net-mvc – Elmah显示,“没有OWIN身份验证管理器与请求
- asp.net-mvc-3 – 如何注入依赖项到global.asax.cs
- asp.net – 为什么我们应该通过部分视图使用MVC 6功能视图组