开发者

database already exists please choose a different name

开发者 https://www.devze.com 2022-12-25 03:47 出处:网络
Here\'s the case I created this Permias.mdf on another solution that I had and then after that I decided not to use that solution and created a new website from visual studio and copy and paste the .m

Here's the case I created this Permias.mdf on another solution that I had and then after that I decided not to use that solution and created a new website from visual studio and copy and paste the .mdf file to be used for this website.

Database 'C:\\Permias.mdf' already exists. Choose a different database nam开发者_如何学Pythone.


I think I finally understand what is happening:

You have project A, and it uses physical file C:\Permias.mdf.

Now, you have project B, and you'd like to use C:\Permias.mdf, so you paste it again in Visual Studio explorer - but, it already physically exists.

Is this correct? If so, you have some options:

  • Include the Permias.mdf into your Project B by right-clicking your solution root in the Solution Explorer, and click 'Add Existing File'.

  • Rename Permias.mdf to something else, or put it in a different folder/location, and make sure to update all references in your code.


Choose a different database name.

EDIT: Kidding! (Sort of.)

0

精彩评论

暂无评论...
验证码 换一张
取 消