Let me offer some help that may not resolve all issues but might help in getting through the initial hurdles. First off, for some reason we haven't yet been able to identify, the installer on 64-bit Windows 7 systems fails to set $WEBSHAPER_HOME until a restart, which exhibits in errors like this:

1
The imported project "C:\IntelliFactory.WebSharper.FSharp.targets" was not found. 

These are coming from the following line in the various project files:

1
2
  <Import Project="$(WEBSHARPER_HOME)\IntelliFactory.WebSharper.[*].targets" />
  ...

If you encounter this sort of errors simply set $WEBSHAPER_HOME manually or try restarting your system. Note also that in this situation if you tried to open a WebSharper project right after installation and failed, Visual Studio will disable the main WebSharper add-in, which will need to be re-enabled after populating the system variable (which needs Visual Studio restarted).

Now, after you sorted the above out, you may meet another class of issues: referencing installed extensions. The sample projects we have available deal with this in various ways, all failing in one way or another due to the fact that users may opt to install extensions in whatever folder they choose. Perhaps we could deal with this by planting special system variables during installing each extension and then subsequently referencing extensions relative to those system variables.

In the absence of this, however, you will need to manually refresh those references. Simply remove any extension references and re-add them pointing to the files you actually have installed on your system. In your case, this means refreshing the references to the jQuery UI extension in both the sitelet and the web project.

By on 2/15/2012 3:40 PM ()

Thank you for the fast response and help all the time.

The demos that everybody can run directly in the browser on your site are so great for newcomers to try out, and see the compact code that's needed. That is a great plus IMHO. So why not put the StickyNotes which seems to be a very cool interactive demo on your site?

I solved the issues and one coding error by doing the following:
- manually unpacking the "IntelliFactory.WebSharper.JQueryUi-2.4.14.msi"
- copy the two containing .dll into "C:\Program Files (x86)\IntelliFactory\WebSharper\2.4\"
- deleting the references to jQueryUI and add it from "C:\Program Files (x86)\IntelliFactory\WebSharper\2.4\"
- deleting the reference to "WebApplication.dll" in project "WebApplication"
- solving the error: \StickyNotes\WebSharperProject\Main.fs(113,42): error FS0495: The member or object constructor 'DraggableConfiguration' has no argument or settable return property 'Handle'. The required signature is new : unit -> JQueryUI.DraggableConfiguration.
by code changing "Handle" to "handle" in Main.fs line 113
JQueryUI.Draggable.New(note, JQueryUI.DraggableConfiguration(handle = ".header")) |> ignore

- build "WebApplication"
- adding reference "WebSharperProject" to project "WebApplication"
- rebuild and run

Will it be possible to build a WebSharper solution with the option to have the jqueryui JS files on the own server, instead of [link:ajax.googleapis.com] ?

That way it will be possible to test and debug it offline.

Is it possible to modify the Web.config to do so?
(similar to the manual for "jQueryUI Extensions for WebSharper" IntelliFactory.WebSharper.JQueryUI.pdf)
<appSettings>
<add key="IntelliFactory.WebSharper.JQueryUI" value="scripts/jquery-ui" />
<add key="IntelliFactory.WebSharper.JQueryUICss" value="css/jquery-ui" />
</appSettings>

StickyNotes has still a dependency to googleapis.com:
</script>
<script src="[link:ajax.googleapis.com] type="text/javascript">
</script><link type="text/css" rel="stylesheet" href="[link:ajax.googleapis.com] />

How can I avoid that?

By on 2/16/2012 2:40 AM ()

I believe those are not the correct app settings, instead please try these:

  • IntelliFactory.WebSharper.JQueryUI.Dependencies.JQueryUIJs
  • IntelliFactory.WebSharper.JQueryUI.Dependencies.JQueryUICss
By on 2/16/2012 7:44 AM ()

I've tried your recommendation alone and also in combination with the one from the manual.
All my configuration trials in Web.config (and rebuilding the hole solution) does not change the html that my localhost provides.

Web.config
<?xml version="1.0"?>
<configuration>

<appSettings>
<add key="IntelliFactory.WebSharper.JQueryUI.Dependencies.JQueryUIJs" value="scripts/jquery-ui" />
<add key="IntelliFactory.WebSharper.JQueryUI.Dependencies.JQueryUICss" value="css/jquery-ui" />
</appSettings>

:

For my understanding the wrapper .WebSharper.JQueryUI.dll.js is correct in the local Scripts folder,
but the real jqueryui/1.8.1 code is loaded from google.

html snippet served from localhost
<script type="text/javascript" src="/Scripts/IntelliFactory.WebSharper.JQueryUI.dll.js">
<script src="[link:ajax.googleapis.com] type="text/javascript">
</script><link type="text/css" rel="stylesheet" href="[link:ajax.googleapis.com] />

In which build/execution "step" are these script includes created in the html? Is there an easy possibility to hard-code them to a local folder?

Any idea?

By on 2/16/2012 10:41 AM ()

The correct documentation is in Section 5 of WebSharper.pdf [link:websharper.com] about working with resources, in particular it states that "The ID of the resource ... is set to the FullName of the class."

You can obtain the FullName by locating the resource type through FSI:

1
typeof<IntelliFactory.WebSharper.JQueryUI.Dependencies.JQueryUIJs>.FullName

This produces: "IntelliFactory.WebSharper.JQueryUI.Dependencies+JQueryUIJs"

You will be able to modify the base URL using these keys, but unfortunately I don't think you will be able to easily get rid of these resources altogether and hard-code your own. I like the idea though, we will try to make this possible in further releases.

By on 2/16/2012 1:15 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper