WebSharper 3.6 released with CDN support

Loic Denuziere

Loic Denuziere

Nov 23, 2015

Reading time:

2 mins

Share via:

We are happy to announce the release of WebSharper 3.6.

The main new feature is the capability to point to our CDNs for the WebSharper libraries. You can simply add the following setting to your application configuration file (Web.config or App.config depending on the project type):

<appSettings>
  <add key="WebSharper.StdlibUseCdn" value="true" />
</appSettings>

The links generated by WebSharper, instead of pointing to /Scripts/WebSharper/... for scripts and /Content/WebSharper/... for CSS, will point to //cdn.websharper.com/{assembly}/{version}/{filename}. You can configure this URL by setting the WebSharper.StdlibCdnFormat configuration setting. And finally, you can configure the CDN URL for the resources of a specific assembly (from the standard WebSharper library or not) by setting the WebSharper.CdnFormat.{assemblyname} configuration setting.

Here is the full change log:

  • #488: Allow adding a macro attribute on a type. The macro is invoked for all static and instance method calls on this type.

  • Fix issue preventing macro use in argument to a PropertyGet/Set.

  • #490: Retrieve appConfig parameters from Web.config or App.config when building a single-page application.

  • #493: Add WebSharperReference project item. This allows you to pass references to the WebSharper compiler that are not referenced by the compiled assembly. For example, adding the following to your project file:

    <ItemGroup>
      <WebSharperReference Include="..\packages\WebSharper.3.6.2.220\lib\net40\WebSharper.Core.dll" />
      <WebSharperReference Include="..\packages\WebSharper.3.6.2.220\lib\net40\WebSharper.Core.JavaScript.dll" />
      <WebSharperReference Include="..\packages\WebSharper.3.6.2.220\lib\net40\WebSharper.JavaScript.dll" />
      <WebSharperReference Include="..\packages\WebSharper.3.5.2.220\lib\net40\WebSharper.JQuery.dll" />
      <WebSharperReference Include="..\packages\WebSharper.3.5.2.220\lib\net40\WebSharper.Main.dll" />
      <WebSharperReference Include="..\packages\WebSharper.3.5.2.220\lib\net40\WebSharper.Control.dll" />
      <WebSharperReference Include="..\packages\WebSharper.3.5.2.220\lib\net40\WebSharper.Collections.dll" />
    </ItemGroup>
    

    and removing the corresponding <Reference> entries allows you to use the proxies from the standard libraries without referencing them in your assembly.

  • Add AssemblyFileVersionAttribute to all standard library assemblies.

  • #494: Add support for pointing resources to a CDN (see above).

  • #495: Add proxies for {Int32,Double,DateTime}.{MinValue,MaxValue}.

  • #496: Add proxy for String.IsNullOrWhiteSpace.

Happy coding!

Read more from

Can’t find what you were looking for? Drop us a line.

Loic Denuziere
Found a typo?

This blog post is hosted on GitHub here. Feel free to file a ticket or send a PR.

Newsletter

We will not spam you or give your details to anyone.