Build input file cannot be found

I have been following this tutorial: https://developer.apple.com/tutorials/app-dev-training/using-stacks-to-arrange-views and after completing step 2 where it states to "Refactor > Rename" the ContentView file to MeetingView, I attempted to "Resume" the preview. When I do so, I get this error:

Build input file cannot be found: '<path>/Scrumdinger/Shared/ContentView.swift'

Apparently it is trying to look for the old name of the file. How can I resolve this issue? I am using XCode 13.

I have found a workaround for this issue with help from this Stack Overflow answer: https://stackoverflow.com/a/48019556/11162441. I noticed in XCode's Project navigator, the name of the old file (ContentView.swift) was still present so I deleted that, then dragged the new file (MeetingView.swift) from the Finder into the Project navigator. That resolved the issue. If anyone has any insights on how to resolve this issue without doing this workaround, feel free to reply for mine or others future benefit.

Build input file cannot be found
 
 
Q