'filenames are used to distinguish private declarations of the same name' error
<p>I am getting this error on generating an NSManagedObject in Xcode 8.1 in Swift. </p>

<blockquote>
  <p>:0: error: filename "DemoOne+CoreDataClass.swift" used twice: '/Users/Swasidhant/Desktop/demo again/DemoOne+CoreDataClass.swift' and '/Users/Swasidhant/Library/Developer/Xcode/DerivedData/demo_again-hiinrbwwbmyfbrbctsfdzvudkkuy/Build/Intermediates/demo again.build/Debug-iphonesimulator/demo again.build/DerivedSources/CoreDataGenerated/Model/DemoOne+CoreDataClass.swift'
  :0: note: filenames are used to distinguish private declarations with the same name
  :0: error: filename "DemoOne+CoreDataProperties.swift" used twice: '/Users/Swasidhant/Desktop/demo again/DemoOne+CoreDataProperties.swift' and '/Users/Swasidhant/Library/Developer/Xcode/DerivedData/demo_again-hiinrbwwbmyfbrbctsfdzvudkkuy/Build/Intermediates/demo again.build/Debug-iphonesimulator/demo again.build/DerivedSources/CoreDataGenerated/Model/DemoOne+CoreDataProperties.swift'
  :0: note: filenames are used to distinguish private declarations with the same name
  Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1</p>
</blockquote>

<p>I searched for this and got answers saying the file might be present twice in the project which is not my case. Another solution I came across was to remove the file from the build phase and add again. That too didn't work. Is it some build setting configuration mistake ? Or something else?</p>

<p>Here is the link with a demo project created with Xcode 8.1 and showing this problem:- <a href="https://www.dropbox.com/s/xwyzhshktb2hqe7/demo2.zip?dl=0">https://www.dropbox.com/s/xwyzhshktb2hqe7/demo2.zip?dl=0</a></p>