dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
6.92k stars 1.15k forks source link

build error: 275='IAddChildInternal' at TFM net35 with dotnet8 #9327

Open peaceshi opened 1 week ago

peaceshi commented 1 week ago

Description

WPF unknown error

Reproduction Steps

https://github.com/kongying-tavern/wpf-template/tree/main

Expected behavior

This template works with dotnet6 and dotnet7 except dotnet8

Actual behavior

build success with dotnet8

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

No response

Other information

No response

lindexi commented 1 week ago

@peaceshi Could you add the log of build error?

lindexi commented 1 week ago

I can repro your issues, and the error message is:

  WpfApp net35 failed with 2 error(s) and 2 warning(s)  
    C:\Code\kongying-tavern_wpf-template\templates\WpfApp\App.xaml(5,43): error MC1000: Unknown build error, 'Known type value 275='IAddChildInternal' is not a valid known type. Line 5 Position 43.'
    C:\Code\kongying-tavern_wpf-template\templates\WpfApp\MainWindow.xaml(8,53): error MC1000: Unknown build error, 'Known type value 275='IAddChildInternal' is not a valid known type. Line 8 Position 53.'
WpfApp net6.0-windows succeeded with 2 warning(s) (0.1s)
Build failed with 2 error(s) and 6 warning(s) in 0.8s

This error is thrown by WPF's PresentationBuildTasks.

peaceshi commented 13 hours ago

It’s been 7 days, any progress?

lindexi commented 11 hours ago

@peaceshi Sorry, no. I guess it's a compatibility problem with PresentationBuildTasks.