Развертывание .NET core 3.0 на основе Azure Linux в службе приложений. Не удалось загрузить тип «Microsoft.AspNetCore.Identity.UI.UIFrameworkAttribute». - PullRequest
0 голосов
/ 23 октября 2019

Я пытаюсь развернуть простой проект .NETCORE 3.0 в службе приложения без использования Docker.

Обратите внимание, что в проекте используется индивидуальная аутентификация

individual authentication

Проект работает хорошо в Visual Studio, и если я собрал его и в докер-контейнер.

Когда я пытаюсь использовать службу развертывания веб-приложений и подключить его к gitРепо напрямую с использованием Kudu я получил эту проблему.

Выполнение команды: dotnet "WebApplication1.dll" Необработанное исключение. System.TypeLoadException: не удалось загрузить тип «Microsoft.AspNetCore.Identity.UI.UIFrameworkAttribute» из сборки «Microsoft.AspNetCore.Identity.UI, версия = 3.0.0.0, культура = нейтральная, PublicKeyToken = adb9793829ddae60». в System.ModuleHandle.ResolveTypeHandleInternal (модуль RuntimeModule, Int32 typeToken, RuntimeTypeHandle [] typeInstantiationContext, RuntimeTypeHandle [] methodInstantiationContext) в System.Reflection.RuntimeModule. CustomAttribute.FilterCustomAttributeRecord (MetadataToken caCtorToken, MetadataImport и область применения, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, булева mustBeInheritable, ListBuilder 1& derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder 1 & атрибуты, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, булева mustBeInheritable, ListBuilder 1 derivedAttributes) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) at System.Reflection.RuntimeAssembly.GetCustomAttributes(Type attributeType, Boolean inherit) at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit) at System.Reflection.CustomAttributeExtensions.GetCustomAttributes[T](Assembly element) at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.GetApplicationPartAssemblies(String entryAssemblyName) at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.PopulateDefaultParts(String entryAssemblyName) at Microsoft.Extensions.DependencyInjection.MvcCoreServiceCollectionExtensions.GetApplicationPartManager(IServiceCollection services) at Microsoft.Extensions.DependencyInjection.MvcCoreServiceCollectionExtensions.AddMvcCore(IServiceCollection services) at Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddControllersCore(IServiceCollection services) at Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddControllersWithViewsCore(IServiceCollection services) at Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddControllersWithViews(IServiceCollection services) at Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddMvc(IServiceCollection services) at Microsoft.AspNetCore.Identity.IdentityBuilderUIExtensions.AddRelatedParts(IdentityBuilder builder, UIFramework framework) at Microsoft.AspNetCore.Identity.IdentityBuilderUIExtensions.AddDefaultUI(IdentityBuilder builder, UIFramework framework) at Microsoft.AspNetCore.Identity.IdentityBuilderUIExtensions.AddDefaultUI(IdentityBuilder builder) at Microsoft.Extensions.DependencyInjection.IdentityServiceCollectionUIExtensions.AddDefaultIdentity[TUser](IServiceCollection services, Action 1 configureOptions) в WebApplication1.Startup.ConfigureServices (IServiceCollection services) в /tmp/8d75733ffb7bf8d/Startup.cs:line 33 at System.RuntimeMethodHandle.InvokeMethod (объектная цель, аргументы объекта [], сигнатура сигнатуры, логический конструктор системы, логическая функция wrapExceptions).Reflection. <> c__DisplayClass9_0.g__Startup | 0 (IServiceCollection serviceCollection) в Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke (Экземпляр объекта, IServiceCollection services) в Microsoft.AspNetCore.Hosting.ConfigureServicesBuil0.Clay_0. 0.Hosting.GenericWebHostBuilder.UseStartup (тип startupType, контекст HostBuilderContext, сервисы IServiceCollection) в Microsoft.AspNetCore.Hosting.GenericWebHostBuilder. <> C__DisplayClass12_0.b__0 (hostBust_Exservice)Microsoft.Extensions.Hosting.HostBuilder.Build () в ИнтернетеApplication1.Program.Main (String [] args) в /tmp/8d75733ffb7bf8d/Program.cs:line 16 /opt/startup/startup.sh: строка 11: 29 Прервано (сброшено ядро) dotnet "WebApplication1.dll"

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...