Closed seanmorangsp closed 5 years ago
Hi!
The loggings are all working on preview 7:
I'm still investigating, but, for what it's worth, I'm having the exact issue as the original report. This is just from a brand new install, and latest Blazor.Extensions.Logging
from NuGet
Here's the relevant version info from .csproj
:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazor.Extensions.Logging" Version="0.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="3.0.0-preview7.19365.7" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.0.0-preview7.19365.7" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.0.0-preview7.19365.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0-preview7.19362.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0-preview7.19362.6" />
</ItemGroup>
</Project>
Can you clone the repo, run the test project and see if the problem is happening? Otherwise I can't reproduce the problem here.
Please try again with preview9. I'm unable to reproduce it and there is no activity here, so I'm closing the issue.
This happens both on a new webapplication1 type project as well as a project with a busy Startup.cs.
The Startup code is:
and it eventually blows up in program.cs as
InvalidOperationException: Error while validating the service descriptor 'ServiceType: Microsoft.Extensions.Hosting.IHostApplicationLifetime Lifetime: Singleton ImplementationType: Microsoft.Extensions.Hosting.Internal.ApplicationLifetime': Cannot consume scoped service 'Microsoft.JSInterop.IJSRuntime' from singleton 'Microsoft.Extensions.Logging.ILogger`1[Microsoft.Extensions.Hosting.Internal.ApplicationLifetime]'.
Removing the code block eliminates the error, and all logging functionality.