简体   繁体   English

如何将Lightswitch应用程序部署为Web应用程序和桌面应用程序?

[英]How can I deploy a Lightswitch application as both a web application and a desktop application?

I want to publish my LightSwitch application as both a 3-tier desktop app and a web app. 我想将我的LightSwitch应用程序发布为3层桌面应用程序和Web应用程序。 Is there any way to do this in a synchronized manner? 有没有办法以同步的方式做到这一点? And are there any commands that would allow me to do checks before trying eg OOB actions in a web app? 是否有任何命令允许我在尝试例如Web应用程序中的OOB操作之前进行检查? Basically, I can't find anything on the web about deployment in both Desktop(OOB) and web. 基本上,我无法在网上找到有关在桌面(OOB)和网络中部署的任何内容。 I want to know if there is any knowledge on this. 我想知道是否有任何相关知识。

You should be able to detect if your lightswitch app is in-browser or out-of-browser, using the AutomationFactory.IsAvailable property, which should return false for in-browser, and true for out-of-browser. 您应该能够使用AutomationFactory.IsAvailable属性检测您的lightswitch应用程序是在浏览器中还是在浏览器之外,该属性应该在浏览器中返回false,对于浏览器外则为true。

With regard to publishing to both Desktop and Web, I think you can just run the publish wizard for Desktop so that it produces the necessary files in the ../Publish directory, save them somewhere, then re-run the publish wizard for the Web. 关于发布到桌面和Web,我认为您可以只运行Desktop的发布向导,以便它在../Publish目录中生成必要的文件,将它们保存在某处,然后重新运行Web的发布向导。 As long as you are publishing the data to the same location (provided you want shared data between both applications), then this should work (however I haven't tried it so no guarantees). 只要您将数据发布到同一位置(假设您希望在两个应用程序之间共享数据),那么这应该可行(但我没有尝试过,所以没有保证)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM