通过Brew安装KVM。使用GitHub文档。这里
克隆样品。使用示例HelloMVC'kvm restore'
不会出错
'k web'
我收到:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Framework.ConfigurationModel.IConfiguration, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: 'Microsoft.Framework.ConfigurationModel.IConfiguration, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
关于在哪里或如何解决这个问题的任何想法?
编辑
该修复程序确实有效。我删除了我的目录,从github重新克隆了以下修复程序的步骤,是的,现在我运行了
红k
Microsoft.Framework.Runtime.Roslyn.RoslynCompilationException: /Users/dsmith/Projects/Home/samples/HelloMVC/Startup.cs(11,17): error CS1061: 'IApplicationBuilder' does not contain a definition for 'UseErrorPage' and no extension method 'UseErrorPage' accepting a first argument of type 'IApplicationBuilder' could be found (are you missing a using directive or an assembly reference?)
这是一个C#编译错误,这意味着已找到程序集并尝试进行编译,因此我正在取得进步,我确实会看到在Github问题上引用的该错误,下面将作为答案提供。我发现谢谢!
好的,因此我在github问题(https://github.com/aspnet/Home/issues/310)中提供的帮助下完成了此工作。
首先我跑了
KVM升级
然后我将github帖子中概述的Nuget.config的内容复制到网站根目录中的Nuget.config中
<configuration>
<packageSources>
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetrelease/" />
<add key="NuGet.org" value="https://nuget.org/api/v2/" />
</packageSources>
<packageSourceCredentials>
<AspNetVNext>
<add key="Username" value="aspnetreadonly" />
<add key="ClearTextPassword" value="4d8a2d9c-7b80-4162-9978-47e918c9658c" />
</AspNetVNext>
</packageSourceCredentials> </configuration>
然后,如下修改package.json
"dependencies": {
"Microsoft.AspNet.Server.IIS":"1.0.0-*",
"Microsoft.AspNet.Mvc": "6.0.0-*",
"Microsoft.AspNet.Hosting": "1.0.0-*",
"Microsoft.AspNet.Security.Cookies": "1.0.0-*",
"Microsoft.AspNet.Server.WebListener": "1.0.0-*",
"Microsoft.AspNet.StaticFiles": "1.0.0-*",
"Kestrel": "1.0.0-*"
},
接下来我跑了
kpm恢复
这拉低了许多软件包的beta3版本(beta1之前已经下降)
最后,
红k
因为k web给我有关dll的错误。Dink dank doo .. Bob是你的叔叔。.localhost:5004向我展示了一个ASP.NET网站
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句