title: SwiftUI Preview displays error - Cannot preview in this file -- current target needs adjusted build settings
body: <p>I'm using Xcode 11.1 and all of my swift previews show the following errors:</p>
  
  <p><a href="https://i.stack.imgur.com/pkaGJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pkaGJ.png" alt="swiftui preview pane error"></a></p>
  
  <blockquote>
    <p>Cannot preview in this file -- current target needs adjusted build settings </p>
  </blockquote>
  
  <p>along with </p>
  
  <blockquote>
    <p>"ProjectTests.xctest' failed to get build
    settings:
    unsupportedProductType("com.apple.product-type.bundle.unit-test", &lt;Xc..."</p>
  </blockquote>
  
  <p>Clicking the diagnostics button generates the following popup:</p>
  
  <p><a href="https://i.stack.imgur.com/qVWeB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qVWeB.png" alt="enter image description here"></a></p>
  
  <blockquote>
    <p>Open file has supported build settings
    "ProjectTests.xctest" failed to get build settings: unsupportedProductType("com.apple.product-type.bundle.unit-test", &lt;Xcode3TargetProduct:0xblahblahblahProjectTests.xctest blueprint:&lt; Xcode3Target:0xblahblahProjectTests>>)</p>
  </blockquote>
  
  <p>My previews still render fine, but is there some way to remove this error?</p>