Skip to content

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

Closed

Description

@ascott18

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

Activity

  1. jennyf19 commented on Apr 6, 2023

    @jennyf19
    Collaborator

    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

  2. added
    regressionregression between Microsoft Identity Web versions
    on Apr 6, 2023
  3. yankarinRG commented on Apr 11, 2023

    @yankarinRG

    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.

  4. jmprieur commented on Apr 14, 2023

    @jmprieur
    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

  5. added this to the 2.9.0 milestone on Apr 14, 2023
  6. jennyf19 commented on Apr 15, 2023

    @jennyf19
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedregressionregression between Microsoft Identity Web versions

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions