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

Publishing with Microsoft.AspNetCore.Identity.UI and Microsoft.EntityFrameworkCore.SqlServer 8.0.2+ adds webview2Loader.dll and msalruntime.dll resulting in app not starting #2520

Open
HugCoder opened this issue May 17, 2024 · 2 comments

Comments

@HugCoder
Copy link

Describe the bug

After updating Microsoft.EntityFrameworkCore.SqlServer and possibly in combination with Microsoft.AspNetCore.Identity.UI (and possibly Microsoft.AspNetCore.Identity.EntityFrameworkCore) to 8.0.2 (8.0.3 or 8.0.4), publishing (release mode) to folder suddenly results in adding the (old) DLLs:
msalruntime.dll (2023-05-09)
WebView2Loader.dll (2021-05-25)

and I'm not sure if it's these in particular that cause problem, but in the Windows .NET 8 server environment (using Plesk for .NET support), the application won't start anymore, with only error "HTTP Error 500.31 - Failed to load ASP.NET Core runtime". Trace log only talks about AspNetCoreModuleV2 with fatal error, no details beyond that. The target framework is net8.0-windows.

If you are seeing an exception, include the full exceptions details (message and stack trace).

Exception message: HTTP Error 500.31 - Failed to load ASP.NET Core runtime
Stack trace: None

To reproduce

I think it's the combination of these:

<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.2">

but I assume it depends on where you publish as well, but in any case I don't understand why the old DLLs are suddenly there to begin with and what they are used for.

Expected behavior

I expected the application to start, and not these old DLLs :)

Further technical details

Perhaps it's Plesk missing something in their support for some newer minor version of .NET 8?
Plesk version used seems to be 18.0.60 though, which supposedly adds support for 8.0.3.
The server host provider has confirmed that both 8.0.2 and 8.0.3 runtimes are installed.

Additional context
.NET Version 8
I was forwarded here from the EFCore team (Andriy Svyryd):
dotnet/efcore#33685 (comment)

@arellegue arellegue added ⏳ Waiting for Customer Issues/PRs waiting for user response/action. 🆕 Triage Needed For new issues, not triaged yet. labels May 17, 2024
@arellegue
Copy link
Contributor

Thanks for reporting this issue. In order for us to investigate this and reproduce the issue, could you please provide a repro project.

As soon as we receive the repro, we can begin our investigation.

@kf-gonzalez2 kf-gonzalez2 removed the 🆕 Triage Needed For new issues, not triaged yet. label May 22, 2024
@HugCoder
Copy link
Author

HugCoder commented Jul 23, 2024

Hi again!

I finally had time to create a repro-project here:
https://github.com/HugCoder/SQLClientIssue2520Repro

All you really need to do to recreate above repository is:

  1. Create a new .NET8 Web MVC project with Individual Accounts.
  2. Change project file to <TargetFramework>net8.0-windows</TargetFramework>
  3. Change publish profile to Folder with
    Delete existing files: true
    Configuration: Release
    Target Framework: net8.0-windows
    Target Runtime: win-x64
  4. Publish.

The key seems to be to target net8.0-windows framework in publish, otherwise you won't get the DLL-files mentioned.

@HugCoder HugCoder reopened this Jul 23, 2024
@kf-gonzalez2 kf-gonzalez2 removed the ⏳ Waiting for Customer Issues/PRs waiting for user response/action. label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Investigation
Development

No branches or pull requests

3 participants