I had an old project built using REFramework which encountered the same issue recently. For me, what worked is I had to get a fresh Main.xaml and it.
You can get a fresh one either by:
a. Copying from a working/recent project
b. Creating a fresh project and copying the fresh Main.xaml
Then, you have to rebuild your Main.xaml workflow for your project.
Or if you want an easier approach, use a file differentiating tool (e.g. Beyond Compare) then compare a fresh Main.xaml with your flawed one and adjust the necessary lines.