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

.NET 8.0 Preview 7 #8674

Closed
rbhanda opened this issue Aug 8, 2023 · 9 comments
Closed

.NET 8.0 Preview 7 #8674

rbhanda opened this issue Aug 8, 2023 · 9 comments

Comments

@rbhanda
Copy link
Contributor

rbhanda commented Aug 8, 2023

Release Notes

Please report any issues you find with .NET 8 Preview 7, either responding to this issue, creating a new issue or creating a new issue in one of the following repos:

Known Issues

If there are any issues with this release we will track them here and check issues off as they're resolved. See the linked issues for details on progress and resolution details.

@rbhanda rbhanda changed the title .NET 8.0 Preview 6 .NET 8.0 Preview 7 Aug 8, 2023
@rbhanda rbhanda pinned this issue Aug 8, 2023
@RoySalisbury
Copy link

Updated to preview 7 (ASPNET & EF). The I get the following missing method exception.

System.MissingMethodException: Method not found: 'Void Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping..ctor(System.String, System.Type, System.Nullable`1<System.Data.DbType>, Boolean, System.Nullable`1<Int32>, Boolean, System.Nullable`1<Int32>, System.Nullable`1<Int32>)'.
   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerSqlVariantTypeMapping..ctor(String storeType)
   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerTypeMappingSource..ctor(TypeMappingSourceDependencies dependencies, RelationalTypeMappingSourceDependencies relationalDependencies)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(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)
   

Much longer stack trace but its mainly DI service lookups.

Also went back to EF 7.0.10 and 7.0.9 (with ASPNET @ preview 7) and the same issue.

@Wiz1991
Copy link

Wiz1991 commented Aug 9, 2023

Upgraded to preview 8.0. Trying to make use of IKeyedServices.
Injecting as specified using IServiceProvider.AddKeyedScoped<>()

When trying to resolve using GetKeyedService<>() i get the following error:
This service provider doesn't support keyed services.

@WeihanLi
Copy link
Contributor

WeihanLi commented Aug 9, 2023

Trying to make use of IKeyedServices. Injecting as specified using IServiceProvider.AddKeyedScoped<>()

When trying to resolve using GetKeyedService<>() i get the following error: This service provider doesn't support keyed services.

The same issue met, issue created here dotnet/runtime#90235

edit

already fixed while the fix not included in the preview 7 release, maybe we should document it as a known issue

@RoySalisbury
Copy link

Updated to preview 7 (ASPNET & EF). The I get the following missing method exception.

System.MissingMethodException: Method not found: 'Void Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping..ctor(System.String, System.Type, System.Nullable`1<System.Data.DbType>, Boolean, System.Nullable`1<Int32>, Boolean, System.Nullable`1<Int32>, System.Nullable`1<Int32>)'.
   

Also went back to EF 7.0.10 and 7.0.9 (with ASPNET @ preview 7) and the same issue.

I have updated to the daily RC builds and this is gone now. My guess is that things are just out of sync for preview 7.

@DuelMonster
Copy link

DuelMonster commented Aug 29, 2023

I'm currently getting the following with preview 7:

System.MissingMethodException: Method not found: 'Boolean Microsoft.IdentityModel.Tokens.TokenUtilities.IsRecoverableConfiguration(Microsoft.IdentityModel.Tokens.TokenValidationParameters, Microsoft.IdentityModel.Tokens.BaseConfiguration, Microsoft.IdentityModel.Tokens.BaseConfiguration ByRef)'.

It appears to be missing a param:
image
image


Having looked into the latest source, this appears to have been resolved: src/System.IdentityModel.Tokens.Jwt [line 941]

Guess I'll wait for preview 8 😉

@WeihanLi
Copy link
Contributor

There's no preview 8, next release would be RC1

@DuelMonster
Copy link

Turned out to be the System.IdentityModel.Tokens.Jwt didn't update to 6.32.2 when I updated Microsoft.IdentityModel.Tokens to 6.32.2

@karpikpl
Copy link

One bug I found - (that's already fixed but I'll explain) is with template dotnet new webapi --auth SingleOrg on net8.

It creates project with following dependencies:

    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0-preview.7.23375.9" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.0-preview.7.23375.9" />
    <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0-preview.7.23375.9" />
    <PackageReference Include="Microsoft.Identity.Web" Version="2.12.2" />
    <PackageReference Include="Microsoft.Identity.Web.DownstreamApi" Version="2.12.2" />
    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />

when configured with AAD values for Domain, TenantId and ClientId, the APIs always return 401 with invalid_token message.
Updating Microsoft.Identity.Web to 2.13.4 fixes the issue, but it took me whole day of debugging to figure that out.

Hopefully this helps someone who faces this issue. If someone tells me where I can submit a PR to templates repo, I'd be happy to submit the fix.

@rbhanda
Copy link
Contributor Author

rbhanda commented Sep 12, 2023

closing in favor of #8759

@rbhanda rbhanda closed this as completed Sep 12, 2023
@rbhanda rbhanda unpinned this issue Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants