.net 5 とビジュアル スタジオ コードを使用して最初の helloword アプリを実行しようとしています。
dnvm list を入力すると、次のようになります。
Active Version Runtime Architecture OperatingSystem Alias
------ ------- ------- ------------ --------------- -----
1.0.0-beta4 clr x64 win
1.0.0-beta4 clr x86 win
1.0.0-beta4 coreclr x64 win
1.0.0-beta4 coreclr x86 win
1.0.0-beta4-11566 clr x64 win
1.0.0-beta4-11566 clr x86 win
1.0.0-beta4-11566 coreclr x64 win
1.0.0-beta5 clr x86 win
1.0.0-beta5 coreclr x86 win
* 1.0.0-rc1-update1 clr x64 win default
1.0.0-rc1-update1 clr x86 win
1.0.0-rc1-update1 coreclr x64 win
1.0.0-rc1-update1 coreclr x86 win
そして、私の project.json は単純です:
{
"frameworks": {
"dnx451":{}
}
}
しかし、フォルダーで DNX RUN を使用してアプリを実行すると、このエラーが発生します
System.InvalidOperationException: The current runtime target framework is not compatible with 'HelloWorld'.
Current runtime target framework: 'DNXCore,Version=v5.0 (dnxcore50)'
Version: 1.0.0-rc1-16231
Type: CoreClr
Architecture: x64
OS Name: Windows
OS Version: 10.0
Runtime Id: win10-x64
Please make sure the runtime matches a framework specified in project.json
at Microsoft.Dnx.ApplicationHost.DefaultHost.GetEntryPoint(String applicationName)
at Microsoft.Dnx.ApplicationHost.Program.ExecuteMain(DefaultHost host, String applicationName, 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, String appBase, FrameworkName targetFramework)
at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, BootstrapperContext bootstrapperContext)
at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, BootstrapperContext bootstrapperContext)
d:\P\HelloWorld>