How to distribute a C# project that uses "Localdb" to an "other computer"?

Asked

Viewed 829 times

1

I have a College project in C# to finish. The application works and all functionalities have been implemented.

I’m using Visual Studio 2015’s Localdb v12 in conjunction with Entity Framework.

The teacher promised extra points to those who can do Publish of the application and it rotate in another computer other than what was used to develop.

I was able to use the Publish from Visual Studio 2015, but when I try to run on another computer, it gives a database error. Connection to Database Error.

How do I give Publish in the project with the database together?

  • What error occurs?

  • Cannot open database "Testedb" requested by login. The login failed. Login failed for user 'usuario xxx",

  • Please publish the <ConnectionStrings> of your web config..

  • 2

    I wouldn’t do that. You may have authentication information on your computer. If it’s a machine on an outside accessible network...

  • What you can do is not associate a Windows account with Localdb. Use SQL authentication (no built-in security, and you need to create the user and password structures in the database). So you let your application disassociate from a specific machine or network.

  • 1

    After a long and exhausting search, I finally found the answer.... on youtube. https://www.youtube.com/watch?v=zx6w3BDD6Sg You helped me with this video. Anyone with the same doubt, it really solves. I was able to install on two computers that even development tools didn’t have.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.