Previews won't show in Xcode 14

I have this problem where sometimes previews just stop working in a project. It happened to me once in Xcode 13, and it happened for my now in Xcode 14.

How do you get the preview pane to show again? The only way I was able to fix it before was recreating the entire project.

Does the file have a PreviewProvider defined and an import SwiftUI?

Yes, they do! If I create a new SwiftUI project, and copy the same files over it works.

Previews won't show in Xcode 14
 
 
Q