如何在Visual Studio中发布项目后知道数据库文件路径? [英] How to know database file path after publishing project in visual studio?

查看:97
本文介绍了如何在Visual Studio中发布项目后知道数据库文件路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我通过右键单击我的项目并点击发布,在visual studio中发布了我的项目,问题是数据库文件路径发生了变化,我找不到它,我需要路径把它放在连接字符串中

可以任何人帮助我。

Hello everyone,
I published my project in visual studio by right-click on my project and click publish, the problem is the database file path is changed and i can't find it, i need the path to put it in connection string
can any one help me, please.

推荐答案

你听说过类似的东西吗? web.config或app.config?您是否还添加了一个操作来指定需要将数据库文件发布到?它不是编译器生成/使用的东西,因此它不会随之自动发布。



祝你好运!
Have you ever heard about something like a web.config or app.config? Did you also add an action to specify that the database file needs to be published to? It isn't something the compiler generates/uses so it is not automatically published with it.

Good luck!


这篇关于如何在Visual Studio中发布项目后知道数据库文件路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆