A: 

I looks like you just have an invalid AttachDbFilename - unless your target deployment machine actually has VS2010 installed, and your project on it.

The path to the MDF needs to be a relative path, and then you can change the properties of the MDF in your VS project to copy it to the output directory.

davisoa
I get the same error when i use a relative path such as:AttachDbFilename=\Data\BDApepuc.mdforAttachDbFilename=Data\BDApepuc.mdf
WoF_Angel
+3  A: 

completely local, it doesn't access servers

It does, it accesses a SQL Server Express server. You'll have to deploy that as well. You could include the bootstrapper for it in your Setup project. Or just download it from Microsoft.

Hans Passant
i'm trying to find the bootstrapper, i dont want, if possible, to add a 80mb file to my tiny project. I will try that anyway.
WoF_Angel
Project + Setup Properties, Prerequisites button, tick "SQL Server 2008 Express".
Hans Passant
Did you actually create a Setup project? The template is under "Other Project Types" + "Setup and Deployment". Not available on the Express edition.
Hans Passant
I found it now. It turns out that for me to "tick" the Sql Server 2008 Express i need to tick "NET 3.5 SP1" and "Windows Installer 4.5". Because of that now the user has to make a gigantic download in order to install, very sad. I must be doing something wrong.
WoF_Angel
If this is some kind of applet that users can download from the Internet, instead of a line-of-business app, then using SQL Server Express is not appropriate. Your user isn't going to be happy getting it installed on their machine, it has non-trivial runtime (and install) requirements. Use SQL Server Compact instead. Or simple files.
Hans Passant
Yes, im trying that now, i will manually convert my sql express db to a sql compact one, and then use sqlmetal to generate the files, i hope it works.
WoF_Angel
Thanks man, you are a pro helper.
WoF_Angel