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

net8 branch doesn't build #84

Open
akhanalcs opened this issue Aug 23, 2023 · 6 comments
Open

net8 branch doesn't build #84

akhanalcs opened this issue Aug 23, 2023 · 6 comments

Comments

@akhanalcs
Copy link

image

@F-Persson
Copy link

You may use

builder.Services.AddAuthentication().AddBearerToken(IdentityConstants.BearerScheme);
builder.Services.AddAuthorizationBuilder();

However you might wanna try the new net 8 IdentityEndpoints. Like

builder.Services.AddAuthentication();
builder.Services.AddAuthorizationBuilder();

builder.Services.AddIdentityApiEndpoints<TodoUser>()
                .AddRoles<IdentityRole>()
                .AddEntityFrameworkStores<AppDbContext>();

The AddIdentityApiEndpoints will add the AddBearerToken(IdentityConstants.BearerScheme) aswell

@davidfowl
Copy link
Owner

Fixed.

@akhanalcs
Copy link
Author

akhanalcs commented Sep 29, 2023

@davidfowl
It doesn't look fixed though.

4>Program.cs(13,1): Error CS7069 : Reference to type 'IRazorComponentsBuilder' claims it is defined in 'Microsoft.AspNetCore.Components.Endpoints', but it could not be found

Just synced the project and tried it again:
image

@F-Persson
Copy link

The Net8 branch works for me. I'm using 8.0.100-rc.1.23455.8 on Win11

@akhanalcs
Copy link
Author

I'm getting this error after updating the SDK to latest version:
image

These are my sdks:
image

@akhanalcs
Copy link
Author

Hi @davidfowl,
I can make this error go away:
image

With this change:
image

image

No error:
image

Do you recommend it?

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

No branches or pull requests

3 participants