MC3000 (Invalid character) error in the content of a control containing accented characters for a user control.
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
### Description
In a user control, if a Label control has an accented character in its content (à - â - ä - é - è - ê etc...), we get an error MC3000: XML 'There is an invalid character in the given encoding.
For a normal application project, the problem is not present.

### Reproduction Steps
- Create a user control.
- Added a label control
- Added an accented character in the Content property (ex:Labelé).
- Generate the solution
- The error is reported
You can test with the attached example
[TestUserControl.zip](https://github.com/user-attachments/files/18286068/TestUserControl.zip)
### Expected behavior
No more errors detected like in a normal WPF application.
### Actual behavior
Error MC3000: XML 'There is an invalid character in the given encoding.
### Regression?
With framework 4.8 there was no problem with my user control.
### Known Workarounds
I don't know.
### Impact
Unable to use my user control with .net 9.
### Configuration
Visual studio 2022 Version 17.12.1
.net 9
Program in VB.
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.