Forum Discussion
Adding Fluent Web App as a distributed Application in .NET Aspire
It demands to set blazor hosting model:
Try this:
create Aspire project,
Add Fluent Web App
register the app as aproject,
Run it.
herr is my error:
Unhandled exception. System.AggregateException: One or more errors occurred. (Method not found: 'Void Microsoft.FluentUI.AspNetCore.Components.LibraryConfiguration.set_HostingModel(Microsoft.FluentUI.AspNetCore.Components.BlazorHostingModel)'.)
---> System.MissingMethodException: Method not found: 'Void Microsoft.FluentUI.AspNetCore.Components.LibraryConfiguration.set_HostingModel(Microsoft.FluentUI.AspNetCore.Components.BlazorHostingModel)'.
at Aspire.Dashboard.DashboardWebApplication.<>c.<.ctor>b__7_2(LibraryConfiguration options)
at Microsoft.FluentUI.AspNetCore.Components.ServiceCollectionExtensions.AddFluentUIComponents(IServiceCollection services, Action`1 configuration) in /_/src/Core/Extensions/ServiceCollectionExtensions.cs:line 42
at Aspire.Dashboard.DashboardWebApplication..ctor(ILogger`1 logger, Action`1 configureServices) in /_/src/Aspire.Dashboard/DashboardWebApplication.cs:line 93
at Aspire.Hosting.Dcp.DcpHostService..ctor(DistributedApplicationModel applicationModel, DistributedApplicationOptions options, ILoggerFactory loggerFactory, IOptions`1 dcpOptions, IOptions`1 publishingOptions, ApplicationExecutor appExecutor, Locations locations, KubernetesService kubernetesService) in /_/src/Aspire.Hosting/Dcp/DcpHostService.cs:line 60
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithManyArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Aspire.Hosting.DistributedApplication.RunAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/DistributedApplication.cs:line 139
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Aspire.Hosting.DistributedApplication.Run() in /_/src/Aspire.Hosting/DistributedApplication.cs:line 147
at Program.<Main>$(String[] args) in C:\Users\heris\source\repos\AspireApp1\AspireApp1.AppHost\Program.cs:line 5
C:\Users\heris\source\repos\AspireApp1\AspireApp1.AppHost\bin\Debug\net8.0\AspireApp1.AppHost.exe (process 7436) exited with code 0.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . .