Hello @Vincent Faller ,
Welcome to Microsoft Q&A forum.
The error message is clear, currently, you may need to modify the code and make the expression not too long or complex(split it).
I tested on my side and I can confirm that this works in VS 2019 but the error appears in VS 2022. It’s possible that this may be a potential issue. I strongly recommend submitting a ticket on our Developer Community for further investigation.
If you can confirm that it works in previous version of VS 2022, you can try to rollback VS 2022 from VS Installer, this is another workaround temporarily.
If you do submit a ticket, please kindly share the ticket link here for better tracking.
Sincerely,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.