问题
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 executingxbuild
, 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