WebSharper F# - How to run a template project created with VS Code and Ionide?

谁说我不能喝 提交于 2019-12-10 21:44:09

问题


I have never worked with .NET before and I would like to know how to run a WebSharper F# project without any IDE.

Context

  • I'm running Linux with Mono 4.4.2
  • The project was created with VS Code and Ionide, using the template websharperserverclient
  • I'm able to compile the code using the automatically generated file build.sh or by executing xbuild, but only .dll files are generated, I couldn't see any .exe

I thank in advance for any help!

Updates

Using websharperserverclient I get weird results like the one showed in the picture below and xsp4 doesn't give any hint about it.


回答1:


WebSharper can run as an ASP.NET module, so the easiest way to start your app is to run xsp4 (mono's self-hosted ASP.NET server) in the project folder. That's good as a quick server for testing; for production you should rather configure a server like Apache or nginx.

Another solution would be to use the websharpersuave template instead, which does generate a self-serving executable.



来源:https://stackoverflow.com/questions/39559325/websharper-f-how-to-run-a-template-project-created-with-vs-code-and-ionide

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!