Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ASP.NET Core 3.0 #515

Closed
thijstijsma opened this issue Feb 17, 2019 · 3 comments
Closed

Support for ASP.NET Core 3.0 #515

thijstijsma opened this issue Feb 17, 2019 · 3 comments
Labels

Comments

@thijstijsma
Copy link

Right now the following exception is thrown when trying to use PiranhaCMS in an ASP.NET Core 3.0 project (BasicWeb). The only difference is the TargetFramework in the csproj, changing it to ASP.NET Core 2.2 works fine.

An unhandled exception occurred while processing the request.
MissingMethodException: Method not found: 'System.Collections.Generic.IList`1<Microsoft.Extensions.FileProviders.IFileProvider> Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions.get_FileProviders()'.

IdentityModuleExtensions+<>c__DisplayClass0_0<T>.<AddPiranhaIdentity>b__0(RazorViewEngineOptions options)

    Stack Query Cookies Headers Routing 

    MissingMethodException: Method not found: 'System.Collections.Generic.IList`1<Microsoft.Extensions.FileProviders.IFileProvider> Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions.get_FileProviders()'.
        IdentityModuleExtensions+<>c__DisplayClass0_0<T>.<AddPiranhaIdentity>b__0(RazorViewEngineOptions options)
        Microsoft.Extensions.Options.ConfigureNamedOptions<TOptions>.Configure(string name, TOptions options)
        Microsoft.Extensions.Options.OptionsFactory<TOptions>.Create(string name)
        Microsoft.Extensions.Options.OptionsManager<TOptions>+<>c__DisplayClass5_0.<Get>b__0()
        System.Lazy<T>.ViaFactory(LazyThreadSafetyMode mode)
        System.Lazy<T>.ExecutionAndPublication(LazyHelper executionAndPublication, bool useDefaultConstructor)
        System.Lazy<T>.CreateValue()
        System.Lazy<T>.get_Value()
        Microsoft.Extensions.Options.OptionsCache<TOptions>.GetOrAdd(string name, Func<TOptions> createOptions)
        Microsoft.Extensions.Options.OptionsManager<TOptions>.Get(string name)
        Microsoft.Extensions.Options.OptionsManager<TOptions>.get_Value()
        Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine..ctor(IRazorPageFactoryProvider pageFactory, IRazorPageActivator pageActivator, HtmlEncoder htmlEncoder, IOptions<RazorViewEngineOptions> optionsAccessor, ILoggerFactory loggerFactory, DiagnosticListener diagnosticListener)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite scopedCallSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitNoCache(ServiceCallSite callSite, TArgument argument)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite scopedCallSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite scopedCallSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine+<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
        Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
        Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
        Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<T>(IServiceProvider provider)
        Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)
        Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultAsync(IActionResult result)
        Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeNextResultFilterAsync<TFilter, TFilterAsync>()
        Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContext context)
        Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext<TFilter, TFilterAsync>(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
        Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
        Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeNextResourceFilter()
        Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContext context)
        Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
        Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
        Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeAsync()
        Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext)
        Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext)
        Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
        Piranha.Manager.ResourceMiddleware.Invoke(HttpContext context)
        Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
        Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
        Piranha.AspNetCore.SitemapMiddleware.Invoke(HttpContext context, IApi api, IApplicationService service)
        Piranha.AspNetCore.StartPageMiddleware.Invoke(HttpContext context, IApi api, IApplicationService service)
        Piranha.AspNetCore.ArchiveMiddleware.Invoke(HttpContext context, IApi api, IApplicationService service)
        Piranha.AspNetCore.PostMiddleware.Invoke(HttpContext context, IApi api, IApplicationService service)
        Piranha.AspNetCore.PageMiddleware.Invoke(HttpContext context, IApi api, IApplicationService service)
        Piranha.AspNetCore.AliasMiddleware.Invoke(HttpContext context, IApi api, IApplicationService service)
        Piranha.AspNetCore.ApplicationMiddleware.Invoke(HttpContext context, IApi api, IApplicationService service)
        Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
        Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
        Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)````
@tidyui
Copy link
Member

tidyui commented Feb 18, 2019

As 3.0 is further away than our next release we haven’t tested it yet. The error looks like it has something to do with how views are embedded. As this will be changed to Razor Class Libraries in our 6.0 release I’m guessing this error will sort itself out after that.

@thijstijsma
Copy link
Author

I have investigated a bit further and it doesn't seem to be worth the hassle to switch to the Razor Sdk right now if you're already going for Razor Class Libraries in 6.0. Seeing that the target date is set to end of march, I'm closing this issue and will stay on 2.2 for now (or pull both 6.0 branches and get cracking).

@tidyui
Copy link
Member

tidyui commented Feb 28, 2019

We have decided to release a minor version 5.4 in wait for the next major release. In this version the manager will be converted to a Razor Class Library, maybe you'll have better luck with this version on 3.0. See #527

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants