I had the same issue. After I expanded the error message, I found that it was saying the .MDF file was compressed.
I googled the issue and found this resource that solved my issue.
https://blogs.msdn.microsoft.com/sqlblog/2006/10/02/sql-server-databases-are-not-supported-on-compressed-volumes/
If your error is similar to this:
Create failed for Database 'Compressed_DB'. (Microsoft.SqlServer.Smo)
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
The file "E:Compressed_DB.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors. (Microsoft SQL Server, Error: 5118)
Then you can right click the folder in which the .MDF file resides, click "Properties".
Click "Advanced" in the General tab, and uncheck "Compress contents to save disk space"
This solved the error I was getting, so try it out and attach your .MDF again.