如何在调试模式下更改lightswitch应用程序的连接字符串

Fab*_*nde 5 visual-studio-lightswitch

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

但我似乎可以让它发挥作用.任何时候我在applicationroot/bin/debug中更改web.config,当我在调试模式下运行应用程序时,文件将使用文件中的原始值重新创建.

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

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

dan*_*era 2

来自Andy Kung 灯开关团队:

如果附加到外部数据源,您可以在解决方案资源管理器中右键单击该节点,然后选择“更新数据源”来修改服务器信息,而无需重新创建屏幕。

编辑

...但事实并非如此。

你应该applicationroot/ServerGenerated/Web.config改变applicationroot/bin/debug/web.config。

解释:

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

然后project\ServerGenerated\Web.config找到连接字符串:

<connectionStrings>
    <add name="_IntrinsicData" ... />
    <add name="e8f0cfed-653d-42fc-9617-bcaee11eed91" connectionString="HERE!!!!!!
Run Code Online (Sandbox Code Playgroud)