dotnet / dotnet/aspnetcore

Microsoft.AspNetCore.AzureAppServices.SiteExtension causes ANCM startup error due to System.Windows.Extensions

Open
#65,232 1 comment 1 reaction 0 assignees View on GitHub
area-networking feature-iis
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

1. Have a running AspNetCore app on Azure App Service with .Net 9
2. Add the AspNetCore Logging Site Extension (Microsoft.AspNetCore.AzureAppServices.SiteExtension), tried with both the latest version (10.0.2) and the latest 9.x version (9.0.12)
3. Get this error:
```
HTTP Error 500.31 - ANCM Failed to Find Native Dependencies
Common solutions to this issue:
The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.
```
Enabling stdout logs in web.config shows this error:
```
An assembly specified in the application dependencies manifest (AppNameHere.deps.json) was not found:
package: 'System.Windows.Extensions', version: '8.0.0'
path: 'runtimes/win/lib/net8.0/System.Windows.Extensions.dll'
```
4. There's no net8.0 folder under runtimes/win/lib
5. Looking at AppNameHere.deps.json I see that System.Windows.Extensions is required by Microsoft.CodeAnalysis.Workspaces.MSBuild/4.12.0
6. After removing the site extension, the site runs fine (and the deps.json file still requires System.Windows.Extensions, and there is still no net8.0 folder under win/lib)

### Expected Behavior

The site extension should not cause an ANCM startup error

### Steps To Reproduce

N/A

### Exceptions (if any)

_No response_

### .NET Version

9

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.