Skip to content

"Microsoft.Extensions.Configuration.Binder" v8.x causes WPF self-contained publish failed #9660

@tp1415926535

Description

@tp1415926535

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

Metadata

Metadata

Assignees

Labels

InvestigateRequires further investigation by the WPF team.regressionstatus: This issue is a regression from a previous build or release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions