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

Razor Pages are entirely missing from DLLs since 2.0.2-preview #2183

Closed
ascott18 opened this issue Apr 5, 2023 · 5 comments · Fixed by #2200
Closed

Razor Pages are entirely missing from DLLs since 2.0.2-preview #2183

ascott18 opened this issue Apr 5, 2023 · 5 comments · Fixed by #2200
Labels
question Further information is requested regression regression between Microsoft Identity Web versions
Milestone

Comments

@ascott18
Copy link

ascott18 commented Apr 5, 2023

Microsoft.Identity.Web Library

Microsoft.Identity.Web.UI

Microsoft.Identity.Web version

2.7.0

Web app

Sign-in users

Web API

Not Applicable

Token cache serialization

Not Applicable

Description

Since version 2.0.2-preview of this library, the compiled Razor Pages are entirely missing from the nuget package for .net6.0+ targets.

This also obviously prevents these pages from being routed to, since the endpoints for the razor pages also doesn't exist, the URL generated here does not know of a page identified by /Account/SignedOut.

Reproduction steps

  1. Download Microsoft.Identity.Web.UI from nuget.org, any version from 2.0.2-preview onward
  2. Open the nuget package with your tool of choice
  3. Observe that Microsoft.Identity.Web.UI.Views.dll is not present in the nuget packages for net6.0 and net7.0 (but it is present for netcoreapp3.1)

image

Error message

No response

Id Web logs

No response

Relevant code snippets

No code needed - issue is readily apparently from the nuget package contents.

Instantiate the ASP.NET Web App template from Visual Studio and select Microsoft Identity Platform as the authentication type. Then upgrade the Microsoft.Identity packages to the latest, remove the FallbackPolicy from Program.cs, and observe that https://localhost:7112/MicrosoftIdentity/Account/SignedOut returns a 404, while previous versions show a page with a message.

Regression

2.0.0-beta, all 1.x versions

Expected behavior

The razor pages exist

@ascott18 ascott18 added the question Further information is requested label Apr 5, 2023
@jennyf19
Copy link
Collaborator

jennyf19 commented Apr 6, 2023

We need to look into this:
View components in ASP.NET Core | Microsoft Learn
Razor file compilation in ASP.NET Core | Microsoft Learn

Looks like there was a breaking change in the ASP.NET Core views between NET5 and 6. Thanks for opening the issue.

Possibly related to: #2095

@jennyf19 jennyf19 added the regression regression between Microsoft Identity Web versions label Apr 6, 2023
@yankarinRG
Copy link

yankarinRG commented Apr 11, 2023

Looks like there was a breaking change in the ASP.NET Core views between NET5 and 6. Thanks for opening the issue.

This should be it.

@jmprieur
Copy link
Collaborator

This is due to a breaking change between net5 and net6.
For now the workaround is to release a net5.0 target for Id.Web.UI, while we are working with the ASP.NET Core team to understand a possible fix

@jennyf19 jennyf19 added this to the 2.9.0 milestone Apr 14, 2023
@jennyf19
Copy link
Collaborator

We've applied a workaround in 2.9.0 which should address the issue. The root cause is a breaking change in ASP.NET Core 6 with the Razor pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested regression regression between Microsoft Identity Web versions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants