Deploy LocalDB using Octopus Deploy

Hi guys,

This is what I did :
Created a Visual Studio 2013 APS.NET MVC project, the default one, with 3 pages, register and login, the one that uses LocalDB.
Installed OctoPack for Nuget creation, configured repository, configured teamcity for build and integration octopus deploy.
After days of trying, I’ve managed to make it build and deploy automatically, but it doesn’t add the LocalDB (mdf) file. The site works, but can’t register/login. These files aren’t included in the nuget. I’ve added them manually on the deployment server, but it still can’t connect.
FYI : I’m new at this and it’s for testing purposes.
Can you give me some tips ?

Kind regards,

I migrated the LocalDB to SQLExpress, I’ll look for how to deploy that instead.

Hi,

Thanks for reaching out. There’s a couple of ways to do this:

If your mdf file is part of the solution

On the “What is packaged?” part of this doco we explain that you need to set the file “Build Action” as Content for Octopack to pick up that file.

If your mdf file is not part of the solution/it gets created during the build

Follow the same logic of the doco below (but for your mdf file) and use the Nuspec file and /p:OctoPackEnforceAddingFiles=true to add the file to your package.

Hope that helps!
Dalmiro