[英]System.IO.FileNotFoundException: 'Microsoft.Framework.ApplicationHost'
Saving user secrets throws an exception in 'Asp .Net 5 beta 7'. 保存用户机密会在“ Asp .Net 5 beta 7”中引发异常。 Specifically, when I execute this statement:
具体来说,当我执行以下语句时:
user-secret set Authentication:Facebook:AppId 1234567890
the following exception occurs: 发生以下异常:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Framework.ApplicationHost' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Framework.ApplicationHost'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at Microsoft.Dnx.Runtime.Loader.LoadContext.Load(AssemblyName assemblyName)
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)
This worked correctly with beta 6
. 这与
beta 6
一起正常工作。 Does anyone know why this exception occurs and what I need to do to fix it? 有谁知道为什么会发生这种异常以及我需要怎么做才能解决?
There was a breaking change . 发生了重大变化 。 Uninstall the old one and install the new one.
卸载旧的,然后安装新的。
Old behavior: 旧行为:
dnu commands install SecretManager
New behavior: 新行为:
dnu commands install Microsoft.Framework.SecretManager
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.