it actually does not really matter where the file is. it is just a pain how vs manages it via the "AttachDatabase" connection string.
the issue is that if vs attached the db already like that for the db designer, if you run your application, and that one tries to connect the same way, you run into exactly that issue.
so, you cannot use that method, and have the db file attached to the sql server instance.
use the "attachdatabase" connection for the end-users shall be ok, but not for the development itself