Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add net6.0 TFM to ExternalAccess.Razor #66846

Merged
merged 1 commit into from
Feb 13, 2023
Merged

Conversation

jjonescz
Copy link
Member

@jjonescz jjonescz commented Feb 13, 2023

Fixes MissingMethodExceptions in Razor tests after updating Roslyn to a version after #66655. These occur because of mismatch in IsExternalInit attribute (credit for discovering the problem goes to @davidwengier).

Details (reference graphs):

Previously, this worked:

  • Microsoft.AspNetCore.Razor.LanguageServer.Test net7.0
    • MS.CA.ExternalAccess.Razor netstandard2.0
      • MS.CA.Workspaces netstandard2.0
        • has its own IsExternalInit attribute embedded ✅
    • MS.CA.Workspaces netcoreapp3.1
      • has its own IsExternalInit attribute embedded ✅

After #66655, it broke:

  • Microsoft.AspNetCore.Razor.LanguageServer.Test net7.0
    • MS.CA.ExternalAccess.Razor netstandard2.0
      • MS.CA.Workspaces netstandard2.0
        • has its own IsExternalInit attribute embedded ❌
    • MS.CA.Workspaces net6.0 👈 changed
      • uses IsExternalInit attribute from System.Runtime

After this PR, it works again:

  • Microsoft.AspNetCore.Razor.LanguageServer.Test net7.0
    • MS.CA.ExternalAccess.Razor net6.0 👈 changed
      • MS.CA.Workspaces net6.0
        • uses IsExternalInit attribute from System.Runtime
    • MS.CA.Workspaces net6.0
      • uses IsExternalInit attribute from System.Runtime

(Alternative would be making Microsoft.AspNetCore.Razor.LanguageServer.Test target net472. I tried that but got AppDomainUnloaded exceptions in CI.)

@jjonescz jjonescz mentioned this pull request Feb 13, 2023
3 tasks
@jjonescz jjonescz marked this pull request as ready for review February 13, 2023 18:12
@jjonescz jjonescz requested a review from a team as a code owner February 13, 2023 18:12
@jjonescz jjonescz merged commit a76d9ca into dotnet:main Feb 13, 2023
@jjonescz jjonescz deleted the razor-ea-net60 branch February 13, 2023 20:19
@ghost ghost added this to the Next milestone Feb 13, 2023
Cosifne pushed a commit to Cosifne/roslyn that referenced this pull request Feb 14, 2023
@RikkiGibson RikkiGibson modified the milestones: Next, 17.6 P2 Mar 2, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants