"Microsoft.Extensions.Configuration.Binder" v8.x causes WPF self-contained publish failed
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
### Description
`Microsoft.Extensions.Configuration.Binder` v8.0.0 and above from nuget causes WPF **self-contained** publish failed, and once return to 7.x version, everything works fine. This doesn't happen with console projects or API projects.
Other packages (like `Microsoft.Extensions.Hosting` 8.0.0) that reference these version of the dll will also cause the WPF self-contained publish failed.
### Reproduction Steps
1. Create an empty .NET6 (or other version) WPF project.
2. Add the latest `Microsoft.Extensions.Configuration.Binder` (v8.0.2) in the nuget package manager.
3. Publish to folder with self-contained deployment.
### Expected behavior
Publish Successfully.
### Actual behavior
Publish failed with nothing details.
`C:\Users\%UserName%\AppData\Local\Temp\tmpXXXXX.tmp` only show:
```
System.AggregateException: One or more errors occurred. ---> Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.
--- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.<---
Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.
```
### Regression?
Just use back to version 7.x (e.g. 7.0.4) and release it independently and it will work.
### Known Workarounds
Fallback to the version of the this package, or publish framework-dependent and portable.
### Configuration
.NET6 or .NET7 and so on, whatever.
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.