Coming from 2.5
A few months ago, I installed Websharper 184.108.40.206. If you install Websharper today, you will download version 220.127.116.11-alpha. Unfortunately this contains breaking changes for your old code if you wrote any. Even some examples on Websharper’s website break because of the new version.
The markup types, like “Div” “Table” are not in the namespace “IntelliFactory.WebSharper.Html” anymore, these are now in the namespace “IntelliFactory.WebSharper.Html.Client”. Changing the namespace should do the trick.
This usually applies for new projects. If you run a Websharper client, you may see a “Server Error” complaining that the Fsharp.Core cannot be found, and mentioning something like this:
In the Web.config, you will find this section:
Cannot Add new Item
This one got me worried about the stability of my work-laptop. At some point it is possible that when you want to add a new item, for example, a new .fs file, to you websharper project, that the window listing the code templates is empty. You can still add new items to purely F# projects, or C# projects, so this only happens for Websharper projects.
I am not sure how this situation occurs, but you will need to run this script to get your templates back again: script to recover templates
Also, this script is supplied in a Websharper project when you create a new project, under the name “Setup.fsx”.
Run this script as follows: open Setup.fsx, select all, click with right-mouse on the selected text and run it in the F# Interactive. After this operation, you should have your templates back again.
Did you want to try one of the Websharper examples with remoting and got an HTTP 405? Then you probably took a “Single Page Application” and extended it with [<Rpc>] or [<Remote>] attributes to do something server side.
The problem is: there is no server. If you want to do anything on the server, then you require a Client Server Application. Halfway down the following page you find instructions how to run the remoting examples: Instruction remoting examples