title: How to get Previews working again in a SwiftUI project
body: <p>Recently I have noticed that Previews have stopped working in an app I am working on. I am using the latest Xcode and Catalina (Beta 7). 
  If I add a new View - TestView to my project, its preview fails. This is with no modifications i.e. the default "Hello World" View. The diagnostics say 'TestView' is not a member type of 'MyProject'.
  Any ideas on how to fix this?</p>
  
  <p>If I create a new project, the Previews work fine.</p>
  
  <p>The project runs fine on an actual device or simulator.</p>
  
  <p>The full diagnostics message is:
  'TestView' is not a member type of 'MyProject'</p>
  
  <hr>
  
  <p>failedToBuildDylib: /Users/nigelhamilton/Library/Developer/Xcode/DerivedData/MyProject-bgufjjqbmfuwcaahjswocfzmwsgx/Build/Intermediates.noindex/Previews/MyProject/Intermediates.noindex/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/x86_64/TestView.2.preview-thunk.swift:23:32: error: 'TestView' is not a member type of 'MyProject'
  typealias TestView = MyProject.TestView
                       ~~~~~~~~~ ^
  /Users/nigelhamilton/Library/Developer/Xcode/DerivedData/MyProject-bgufjjqbmfuwcaahjswocfzmwsgx/Build/Intermediates.noindex/Previews/MyProject/Intermediates.noindex/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/x86_64/TestView.2.preview-thunk.swift:16:6: error: replaced accessor for 'body' could not be found
      @_dynamicReplacement(for: body) private var __preview__body: some View {
       ^</p>
  
  <p>I am currently deleting code from my project (or at least a duplicate of the project) to see if it eventually starts to show the preview again. I have had two goes at this, and it has eventually worked, but with most of the code deleted. So I am trying to narrow down where the problem might be.</p>