Я пытаюсь запустить образцы для САШ 5 на OS X: мерзавец клон https://github.com/shirhatti/Home.gitИсключение при запуске Сеть САШ MVC приложение на OS X
Когда я построить проект HelloMvc - «KPM билд» - это нормально , Тогда я бег приложения с помощью «K» пустельги и увидеть следующее сообщение об ошибке:
Missing method Microsoft.Framework.Runtime.ILibraryInformation::get_LoadableAssemblies() in assembly data-0x7feb6aa02a00, referenced in assembly /Users/minya/.kpm/packages/Microsoft.AspNet.Mvc.Core/6.0.0-beta2-11905/lib/aspnet50/Microsoft.AspNet.Mvc.Core.dll System.MissingMethodException: Method not found: 'Microsoft.Framework.Runtime.ILibraryInformation.get_LoadableAssemblies'. at System.Linq.Enumerable+c__Iterator12
2[Microsoft.Framework.Runtime.ILibraryInformation,System.Reflection.AssemblyName].MoveNext() [0x00000] in <filename unknown>:0 at System.Linq.Enumerable+<CreateSelectIterator>c__Iterator10
2[System.Reflection.AssemblyName,System.Reflection.Assembly].MoveNext() [0x00000] in :0 at System.Linq.Enumerable+c__Iterator122[System.Reflection.Assembly,System.Reflection.TypeInfo].MoveNext() [0x00000] in <filename unknown>:0 at Microsoft.AspNet.Mvc.ControllerActionDescriptorProvider.BuildModel() [0x00000] in <filename unknown>:0 at Microsoft.AspNet.Mvc.ControllerActionDescriptorProvider.GetDescriptors() [0x00000] in <filename unknown>:0 at Microsoft.AspNet.Mvc.ControllerActionDescriptorProvider.Invoke (Microsoft.AspNet.Mvc.ActionDescriptorProviderContext context, System.Action callNext) [0x00000] in <filename unknown>:0 at Microsoft.Framework.DependencyInjection.NestedProviders.NestedProviderManager
1+CallNext[Microsoft.AspNet.Mvc.ActionDescriptorProviderContext].CallNextProvider() [0x00000] in :0 at Microsoft.Framework.DependencyInjection.NestedProviders.NestedProviderManager1[Microsoft.AspNet.Mvc.ActionDescriptorProviderContext].Invoke (Microsoft.AspNet.Mvc.ActionDescriptorProviderContext context) [0x00000] in <filename unknown>:0 at Microsoft.AspNet.Mvc.DefaultActionDescriptorsCollectionProvider.GetCollection() [0x00000] in <filename unknown>:0 at Microsoft.AspNet.Mvc.DefaultActionDescriptorsCollectionProvider.get_ActionDescriptors() [0x00000] in <filename unknown>:0 at Microsoft.AspNet.Mvc.Routing.AttributeRouting.GetActionDescriptors (IServiceProvider services) [0x00000] in <filename unknown>:0 at Microsoft.AspNet.Mvc.Routing.AttributeRouting.CreateAttributeMegaRoute (IRouter target, IServiceProvider services) [0x00000] in <filename unknown>:0 at Microsoft.AspNet.Builder.BuilderExtensions.UseMvc (IApplicationBuilder app, System.Action
1 configureRoutes) [0x00000] in :0 at Microsoft.AspNet.Builder.BuilderExtensions.UseMvc (IApplicationBuilder app) [0x00000] in :0 at KWebStartup.Startup.Configure (IApplicationBuilder app) [0x00000] in :0 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 :0
Там нет точной проблемы в гугле. Я попытался переустановить kvm, удалить и выгрузить NuGet.
Обновлено: Подобное поведение на Windows, когда я пытаюсь запустить тот же проект, «K» Сети:
System.MissingMethodException: Method not found: 'System.Collections.Generic.IEnumerable
1<System.Reflection.AssemblyName> Microsoft.Framework.Runtime.ILibraryInformation.g et_LoadableAssemblies()'.
2.MoveNext()
at Microsoft.AspNet.Mvc.DefaultAssemblyProvider.<>c__DisplayClass0.<get_CandidateAssemblies>b__1(ILibraryInformation l)
at System.Linq.Enumerable.<SelectManyIterator>d__14
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext()
2.MoveNext()
at System.Linq.Enumerable.<SelectManyIterator>d__14
at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext()
1.CallNext.CallNextProvider()
at Microsoft.AspNet.Mvc.ControllerActionDescriptorProvider.BuildModel()
at Microsoft.AspNet.Mvc.ControllerActionDescriptorProvider.GetDescriptors()
at Microsoft.AspNet.Mvc.ControllerActionDescriptorProvider.Invoke(ActionDescriptorProviderContext context, Action callNext)
at Microsoft.Framework.DependencyInjection.NestedProviders.NestedProviderManager
at Microsoft.Framework.DependencyInjection.NestedProviders.NestedProviderManager1.Invoke(T context)
1 configureRoutes)
at Microsoft.AspNet.Mvc.DefaultActionDescriptorsCollectionProvider.GetCollection()
at Microsoft.AspNet.Mvc.DefaultActionDescriptorsCollectionProvider.get_ActionDescriptors()
at Microsoft.AspNet.Mvc.Routing.AttributeRouting.GetActionDescriptors(IServiceProvider services)
at Microsoft.AspNet.Mvc.Routing.AttributeRouting.CreateAttributeMegaRoute(IRouter target, IServiceProvider services)
at Microsoft.AspNet.Builder.BuilderExtensions.UseMvc(IApplicationBuilder app, Action
at Microsoft.AspNet.Builder.BuilderExtensions.UseMvc(IApplicationBuilder app)
at HelloMvc.Startup.Configure(IApplicationBuilder app) in C:\prj\Home\samples\HelloMvc\Startup.cs:line 18
кажется, что проблема заключается в одном (или более) ссылка в Microsoft.AspNet .Mvc. * Сборки. Это дизассемблирование DefaultAssemblyProvider из Microsoft.AspNet.Mvc.Core. Я предполагаю, что проблема заключается в методе GetCReferencingLibraries() библиотеки ILibraryManager. Но я не могу найти эту реализацию.
public class DefaultAssemblyProvider : IAssemblyProvider
{
private static readonly HashSet<string> _mvcAssemblyList;
private readonly ILibraryManager _libraryManager;
public IEnumerable<Assembly> CandidateAssemblies
{
get
{
return Enumerable.Select<AssemblyName, Assembly>(Enumerable.SelectMany<ILibraryInformation, AssemblyName>(this.GetCandidateLibraries(), DefaultAssemblyProvider.\u003C\u003Ec__DisplayClass0.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegate2 ?? (DefaultAssemblyProvider.\u003C\u003Ec__DisplayClass0.CS\u0024\u003C\u003E9__CachedAnonymousMethodDelegate2 = new Func<ILibraryInformation, IEnumerable<AssemblyName>>(DefaultAssemblyProvider.\u003C\u003Ec__DisplayClass0.CS\u0024\u003C\u003E9__inst.\u003Cget_CandidateAssemblies\u003Eb__1))), new Func<AssemblyName, Assembly>(DefaultAssemblyProvider.Load));
}
}
static DefaultAssemblyProvider()
{
HashSet<string> hashSet = new HashSet<string>((IEqualityComparer<string>) StringComparer.Ordinal);
string str1 = "Microsoft.AspNet.Mvc";
hashSet.Add(str1);
string str2 = "Microsoft.AspNet.Mvc.Core";
hashSet.Add(str2);
string str3 = "Microsoft.AspNet.Mvc.ModelBinding";
hashSet.Add(str3);
string str4 = "Microsoft.AspNet.Mvc.Razor";
hashSet.Add(str4);
string str5 = "Microsoft.AspNet.Mvc.Razor.Host";
hashSet.Add(str5);
string str6 = "Microsoft.AspNet.Mvc.Rendering";
hashSet.Add(str6);
DefaultAssemblyProvider._mvcAssemblyList = hashSet;
}
public DefaultAssemblyProvider(ILibraryManager libraryManager)
{
this._libraryManager = libraryManager;
}
internal IEnumerable<ILibraryInformation> GetCandidateLibraries()
{
return Enumerable.Where<ILibraryInformation>(Enumerable.Distinct<ILibraryInformation>(Enumerable.SelectMany<string, ILibraryInformation>((IEnumerable<string>) DefaultAssemblyProvider._mvcAssemblyList, new Func<string, IEnumerable<ILibraryInformation>>(this._libraryManager.GetReferencingLibraries))), new Func<ILibraryInformation, bool>(DefaultAssemblyProvider.IsCandidateLibrary));
}
private static Assembly Load(AssemblyName assemblyName)
{
return Assembly.Load(assemblyName);
}
private static bool IsCandidateLibrary(ILibraryInformation library)
{
return !DefaultAssemblyProvider._mvcAssemblyList.Contains(library.get_Name());
}
}
несколько вещей: 1). Нет, где здесь возникает вопрос. 2). Пожалуйста, отформатируйте фрагмент ошибки. 3). Пожалуйста, покажите нам, что вы сделали, чтобы попытаться решить вашу проблему, прежде чем выбросить ее здесь. Мы не являемся вашим личным GoG (Group of Googlers) –
@JSKNS Спасибо за комментарии. Извините за первую версию. – helluvasatan
Каков вывод 'kvm list'? – jandersen