title: How can I resolve this Xcode OptimizationLevelError error while previewing simple swiftui code in canvas?
body: <p>I've been successful using SwiftUI for a few months with very little Xcode experience.  I'm trying to add some simple help screens that I would like to preview in the SwiftUI canvas.  However, I'm receiving the following error:</p>
  
  <p>OptimizationLevelError: not building -Onone</p>
  
  <p>The message is shown when pressing the "diagnostics" button.  Problem persists after pressing "try again" button.</p>
  
  <pre><code>Xcode: Version 11.3 (11C29)
  Catalina: 10.15.2 (19C57)
  </code></pre>
  
  <p>The code could not be simpler:</p>
  
  <pre><code>import SwiftUI
  
  struct HelpSortView: View {
      var body: some View {
          VStack {
              Text("You can sort the list by Name, Sail Number, Class, or Favorites.")
                  .lineLimit(10)
              VStack(alignment: .center) {
                  Image("help-sort")
              }
          }
      }
  }
  
  struct HelpSortView_Previews: PreviewProvider {
      static var previews: some View {
          HelpSortView()
      }
  }
  </code></pre>