gpt4 book ai didi

visual-studio-lightswitch - 如何在 Debug模式下更改灯开关应用程序的连接字符串

转载 作者:行者123 更新时间:2023-12-04 20:48:36 26 4
gpt4 key购买 nike

请我如何更改灯开关应用程序的连接字符串以进行调试。我已经关注了这篇文章
http://dougseven.com/2010/08/23/data-storage-in-visual-studio-lightswitch-2/

但我似乎可以让它工作。每当我在 Debug模式下运行应用程序时更改 applicationroot/bin/debug 中的 web.config 时,文件都会使用文件中的原始值重新创建。

我在发布应用程序时更改它没有问题。

当我在 applicationdefinition.lsml 文件中实现更改时,它没有任何效果

最佳答案

来自 Andy Kung lightswitch team :

If you attach to an external datasource, you can right click on that node in the Solution Explorer and select "Update Datasource" to modify the server info without recreating your screens.



已编辑

……但事实并非如此。

你应该换 applicationroot/ServerGenerated/Web.config相反 applicationroot/bin/debug/web.config .

说明:

如果您转向文件 View ,在 Data/ApplicationDefinition.lslm 中,它们是对您的连接字符串的引用:

然后在 project\ServerGenerated\Web.config找到连接字符串:
<connectionStrings>
<add name="_IntrinsicData" ... />
<add name="e8f0cfed-653d-42fc-9617-bcaee11eed91" connectionString="HERE!!!!!!

关于visual-studio-lightswitch - 如何在 Debug模式下更改灯开关应用程序的连接字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13314643/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com