<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;AkYCQXszeCp7ImA9WhVUGEw.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430</id><updated>2012-05-23T17:09:20.580-07:00</updated><category term="Jasmine" /><category term="Metro" /><category term="MVVM" /><category term="Visual Studio 2010 Scheme" /><category term="mock objects" /><category term="Attached Property" /><category term="F# properties" /><category term="scaling" /><category term="Rhino Mocks" /><category term="MSTest" /><category term="ILDASM" /><category term="MSDN Magazine" /><category term="Linq to XML" /><category term="XAML" /><category term="F# libraries" /><category term="WebSharper" /><category term="jQuery Plugin" /><category term="Dependency Property" /><category term="SpecUnit" /><category term="Querly" /><category term="Web Development" /><category term="ExpectThat" /><category term="TDD" /><category term="ASP.NET MVC 4" /><category term="PowerPack" /><category term="OData" /><category term="ROA" /><category term="FSharpx" /><category term="FSI" /><category term="Integrated Shell" /><category term="MSIL" /><category term=".NET Remoting" /><category term="F# Interactive" /><category term="Fog" /><category term="blogs" /><category term="Scope Document" /><category term="Seq" /><category term="Nashville .NET User Group" /><category term="NUnit" /><category term="Pattern Matching" /><category term="FsUnit" /><category term="jQuery" /><category term="Test Driven Development" /><category term="IoC" /><category term="Unit Test" /><category term="ASP.NET MVC3" /><category term="Polyphony" /><category term="jQuery Templates" /><category term="Recursion" /><category term="F# tools" /><category term="F# Sample Application" /><category term="F#" /><category term="System.Xml.Linq" /><category term="software deployments" /><category term="Value Converter" /><category term="ASP.NET MVC 3" /><category term="Best Practices" /><category term="Caliburn.Micro" /><category term="F# classes" /><category term="CouchDB" /><category term="DI" /><category term="ILASM" /><category term="F# versus C#" /><category term="Visual Studio 11" /><category term="Development" /><category term="Windows Phone 7" /><category term="Ling to SQL" /><category term="CoffeeScript" /><category term="NuGet" /><category term="FSRepository" /><category term="Asynchronous Programming" /><category term="VS2010" /><category term="NHibernate" /><category term="Mocha" /><category term="Why F#" /><category term="Symbiote" /><category term="Seq.sum" /><category term="JavaScript" /><category term="Visual Studio Gallery" /><category term="FSharp.PowerPack" /><category term="F# interfaces" /><category term="feeds" /><category term="Project Templates" /><category term="VS2011" /><category term="Alice" /><category term="Template" /><category term="Windows 8" /><category term="Architecture" /><category term="cache" /><category term="IT" /><category term="Template Wizard" /><category term="VS2010 Template" /><category term="jQuery UI" /><category term="Management" /><category term="DTO" /><category term="Azure" /><category term="ASP.NET MVC" /><category term="Windows Phone" /><category term="Node.js" /><category term="DevLink" /><category term="fsharp" /><category term="Pavlov" /><category term="BDD" /><category term="F# ASP.NET MVC 3" /><category term="F# members" /><category term="Principles and Standards" /><category term="RabbitMQ" /><category term="TypeProvider" /><category term="Presentation" /><category term="Project Euler" /><category term="O'Reilly" /><category term="User Group" /><category term="Methodolgies" /><category term="Scope of Work" /><category term="xUnit.NET" /><category term="Wonderland" /><category term="Design Patterns" /><category term="CodeStock 2009" /><category term="Code Kata" /><category term="REST" /><category term="QUnit" /><category term="Chord" /><category term="FLinq" /><category term="Zombie.js" /><category term="F# PowerPack" /><category term="F# vs. C#" /><category term="jQuery Mobile" /><category term="WP7" /><category term="VB" /><category term="NoSQL" /><category term="ASP.NET Web API" /><category term="C#" /><category term="DHT" /><category term="Data Access" /><category term="IL" /><category term="IoC container" /><category term="Developer Events" /><category term="WCF" /><category term="MbUnit" /><category term="Accelerometer" /><category term="XLinq" /><category term="parallelism" /><category term="F# Presentation" /><category term="Asynchronous Workflows" /><category term="Nashville Geek Lunch" /><category term="WPF" /><category term="Silverlight" /><category term="Erlang" /><title>Random Ravings of a Red Headed Code Monkey</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://bloggemdano.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>127</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><feedburner:info uri="bloggemdano" /><feedburner:emailServiceId>BloggemDano</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/RandomRavingsOfARedHeadedCodeMonkey" /><feedburner:info uri="randomravingsofaredheadedcodemonkey" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><entry gd:etag="W/&quot;AkYCQXg6eCp7ImA9WhVUGEw.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-4103430817080217627</id><published>2012-05-23T17:09:00.000-07:00</published><updated>2012-05-23T17:09:20.610-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-23T17:09:20.610-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Fog" /><category scheme="http://www.blogger.com/atom/ns#" term="fsharp" /><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><category scheme="http://www.blogger.com/atom/ns#" term="Azure" /><category scheme="http://www.blogger.com/atom/ns#" term="cache" /><title>Fog 0.1.3.0 Released</title><content type="html">A new release of Fog is now available. The primary enhancement included in this release is support for Windows Azure Caching. Several bug fixes have also been included.&lt;br /&gt;
&lt;br /&gt;
The caching functions are available in the Fog.Caching module. You can use them with code such as the following:&lt;br /&gt;
&lt;pre class="f-sharp" name="code"&gt;[&amp;lt;DataContract&amp;gt;]
type TestRecord = 
    { [&amp;lt;DataMember&amp;gt;] mutable Id : Guid
      [&amp;lt;DataMember&amp;gt;] mutable Name : string }

let testRecord = { Id = Guid.NewGuid(); Name = "Dan" }

let key = testRecord.Id.ToString()  
Put key testRecord |&amp;gt; ignore

let result = Get&amp;lt;TestRecord&amp;gt; key

&lt;/pre&gt;
&lt;br /&gt;
Fog is available via NuGet as ID &lt;a href="http://nuget.org/packages/Fog"&gt;Fog&lt;/a&gt; and the full source can be found on my &lt;a href="https://github.com/dmohl/Fog"&gt;GitHub&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-4103430817080217627?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/4103430817080217627/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2012/05/fog-0130-released.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/4103430817080217627?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/4103430817080217627?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/6i5cWBneEE0/fog-0130-released.html" title="Fog 0.1.3.0 Released" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2012/05/fog-0130-released.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUIMRHw4eip7ImA9WhVUFUg.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-3834278273379230917</id><published>2012-05-20T16:46:00.000-07:00</published><updated>2012-05-20T16:46:25.232-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-20T16:46:25.232-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="O'Reilly" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery Mobile" /><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><title>Two Books in the Making</title><content type="html">A few weeks ago &lt;a href="http://bloggemdano.blogspot.com/2012/04/f-mstest-and-fsunit-1100.html"&gt;I mentioned&lt;/a&gt; that my blog has been suffering due to a few other ongoing activities. Today, I'm going to tell you about what I've been working on.&lt;br /&gt;
&lt;br /&gt;
A few months ago I had the opportunity to start working on a few different books:&lt;br /&gt;
&lt;br /&gt;
The first is called&amp;nbsp;&lt;a href="http://bloggemdano.blogspot.com/2012/04/f-mstest-and-fsunit-1100.html"&gt;jQuery Mobile Cookbook&lt;/a&gt;. This book is a collaborative effort between &lt;a href="http://appendto.com/"&gt;appendTo&lt;/a&gt;, &lt;a href="http://oreilly.com/"&gt;O'Reilly&lt;/a&gt;, and the jQuery community. The effort is coming along nicely and from what I've seen so far, you're going to love it!&lt;br /&gt;
&lt;br /&gt;
The second is a book on building web, cloud, and mobile solutions with F#. I've partnered with &lt;a href="http://oreilly.com/"&gt;O'Reilly&lt;/a&gt; to create this collection of examples, tips, guidance, architectural approaches, functional+OO patterns and practices, and more. Subjects that are expected to be covered include, but are certainly not limited to, ASP.NET MVC 4, ASP.NET Web API, other frameworks for building HTTP services, using F# to build Windows Azure web and worker roles, WebSharper, and Pit.&lt;br /&gt;
&lt;br /&gt;
If there is something that you would really like to see in either of these books, let me know!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-3834278273379230917?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/3834278273379230917/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2012/05/two-books-in-making.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/3834278273379230917?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/3834278273379230917?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/73OmA_F-mQI/two-books-in-making.html" title="Two Books in the Making" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2012/05/two-books-in-making.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAMQ3g5fip7ImA9WhVVGUs.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-5080021308247457186</id><published>2012-05-13T18:59:00.001-07:00</published><updated>2012-05-13T18:59:42.626-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-13T18:59:42.626-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Fog" /><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><category scheme="http://www.blogger.com/atom/ns#" term="Azure" /><title>Introducing Fog: A Library for Interacting with Azure from F#</title><content type="html">&lt;a href="https://github.com/dmohl/Fog"&gt;Fog&lt;/a&gt; is a library that makes it easier to use F# to interact with Windows Azure through the &lt;a href="https://www.windowsazure.com/en-us/develop/net/"&gt;Windows Azure SDK for .NET&lt;/a&gt;. It provides functions for many of the common activities related to table storage, blob storage, and queue storage as well as service bus queues and topics. Provided functions include both course and fined-grained approaches that remove boiler plate code and make it easier to use various functional patterns and techniques. The course grained functions currently use config settings with specific names to allow most operations to only require a single function call.
&lt;br/&gt;&lt;br/&gt;
The syntax of Fog is pretty straight forward. The following examples use the course grained approach. To see how to use the fined-grained functions, which match almost one to one with the Azure SDK for .NET methods, see the Fog integration tests.
&lt;br/&gt;&lt;br/&gt;
&lt;strong&gt;Blob Storage&lt;/strong&gt;
&lt;br/&gt;&lt;br/&gt;
With Fog all you have to do to interact with Azure blob storage is to add the connection string information in the config with a name of "BlobStorageConnectionString". Once that is done, you can use syntax like the following:
&lt;pre name="code" class="f-sharp"&gt;
UploadBlob "testcontainer" "testblob" "This is a test" |&amp;gt; ignore 
DeleteBlob "testcontainer" "testblob"&lt;/pre&gt;
or
&lt;pre name="code" class="f-sharp"&gt;UploadBlob "testcontainer" "testblob" testBytes |&amp;gt; ignore 
DownloadBlob&amp;lt;byte[]&amp;gt; "testcontainer" "testblob"&lt;/pre&gt;
&lt;strong&gt;Table Storage&lt;/strong&gt;
&lt;br/&gt;&lt;br/&gt;
The simplest way to interact with Azure table storage is to add the connection string information in the config with a name of "TableStorageConnectionString". Once that is done, you can use syntax like the following:
&lt;pre name="code" class="f-sharp"&gt;
[&amp;lt;DataServiceKey("PartitionKey", "RowKey")&amp;gt;] 
type TestClass() = 
    let mutable partitionKey = "" 
    let mutable rowKey = "" 
    let mutable name = "" 
    member x.PartitionKey with get() = partitionKey and set v = partitionKey &amp;lt;- v 
    member x.RowKey with get() = rowKey and set v = rowKey &amp;lt;- v 
    member x.Name with get() = name and set v = name &amp;lt;- v 

let originalClass = 
    TestClass(PartitionKey = "tprt", RowKey = Guid.NewGuid().ToString(), Name = "test") 
CreateEntity "testtable" originalClass |&amp;gt; ignore 

let newClass = originalClass 
newClass.Name &amp;lt;- "test2" 

UpdateEntity "testtable" newClass |&amp;gt; ignore 
DeleteEntity "testtable" newClass 
&lt;/pre&gt;
&lt;strong&gt;Queue Storage&lt;/strong&gt;
&lt;br/&gt;&lt;br/&gt;
For queue storage, add the connection string configuration value with setting name "QueueStorageConnectionString".
&lt;pre name="code" class="f-sharp"&gt;
AddMessage "testqueue" "This is a test message" |&amp;gt; ignore 
let result = GetMessages "testqueue" 20 5 
for m in result do 
    DeleteMessage "testqueue" m &lt;/pre&gt;
&lt;strong&gt;Service Bus&lt;/strong&gt;
&lt;br/&gt;&lt;br/&gt;
There are a few service bus related config entries. Here's the list of expected names: ServiceBusIssuer, ServiceBusKey, ServiceBusScheme, ServiceBusNamespace, ServiceBusServicePath
&lt;br/&gt;&lt;br/&gt;
To send a message do this:
&lt;pre name="code" class="f-sharp"&gt;
type TestRecord = { Name : string } 
let testRecord = { Name = "test" } 

SendMessage "testQueue" testRecord 
&lt;/pre&gt;
To receive a message, pass the queue name, a function to handle successful message retrieval, and another function to handle errors.
&lt;pre name="code" class="f-sharp"&gt;
HandleMessages "testQueue" 
    &amp;lt;| fun m -&amp;gt; printfn "%s" m.GetBody&amp;lt;TestRecord&amp;gt;().Name
    &amp;lt;| fun ex m -&amp;gt; raise ex &lt;/pre&gt;
To use topics in a pub/sub type of scenario, use something like the following to subscribe:
&lt;pre name="code" class="f-sharp"&gt;
Subscribe "topictest2" "AllTopics4" 
    &amp;lt;| fun m -&amp;gt; printfn "%s" m.GetBody&amp;lt;TestRecord&amp;gt;().Name 
    &amp;lt;| fun ex m -&amp;gt; raise ex &lt;/pre&gt;
Message publishing can be accomplished like this:
&lt;pre name="code" class="f-sharp"&gt;
Publish "topictest2" testRecord &lt;/pre&gt;
A few other handy functions include Unsubscribe and DeleteTopic:
&lt;pre name="code" class="f-sharp"&gt;
Unsubscribe "topictest2" "AllTopics4" 
DeleteTopic "topictest2"&lt;/pre&gt;
&lt;strong&gt;How to get it&lt;/strong&gt;
&lt;br/&gt;&lt;br/&gt;
The easiest way to get Fog is to install the &lt;a href="http://nuget.org/packages/Fog"&gt;Fog NuGet package&lt;/a&gt;. You can also find the full source as well as integration tests on the &lt;a href="https://github.com/dmohl/Fog"&gt;Fog GitHub site&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-5080021308247457186?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/5080021308247457186/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2012/05/introducing-fog-library-for-interacting.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/5080021308247457186?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/5080021308247457186?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/X-EswOiIL2w/introducing-fog-library-for-interacting.html" title="Introducing Fog: A Library for Interacting with Azure from F#" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2012/05/introducing-fog-library-for-interacting.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYCRXY5fSp7ImA9WhVWEUU.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-8094672180152921016</id><published>2012-04-23T05:12:00.001-07:00</published><updated>2012-04-23T05:12:44.825-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-23T05:12:44.825-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><category scheme="http://www.blogger.com/atom/ns#" term="MSTest" /><category scheme="http://www.blogger.com/atom/ns#" term="FsUnit" /><title>F#, MSTest, and FsUnit 1.1.0.0</title><content type="html">I've been very busy with a few side projects that I plan to talk more about soon. Sadly, my blog has suffered due to these other activities, but I wanted to take a few minutes to talk about a new &lt;a href="http://visualstudiogallery.msdn.microsoft.com/51ebe64a-899b-4959-8c24-b0148ed6b264"&gt;MSTest project template&lt;/a&gt; available on Visual Studio Gallery as well as some activity going on with &lt;a href="https://github.com/dmohl/FsUnit"&gt;FsUnit&lt;/a&gt;.
&lt;br/&gt;&lt;br/&gt;
&lt;strong&gt;MSTest Project Template:&lt;/strong&gt;
&lt;br/&gt;&lt;br/&gt;
In the first week of March I released a new project template that helps in the creation of unit tests with MSTest and VS11. You can find it at &lt;a href="http://visualstudiogallery.msdn.microsoft.com/51ebe64a-899b-4959-8c24-b0148ed6b264"&gt;http://visualstudiogallery.msdn.microsoft.com/51ebe64a-899b-4959-8c24-b0148ed6b264&lt;/a&gt; or by searching for "fsharp mstest" in the Visual Studio Gallery online templates.
&lt;br/&gt;&lt;br/&gt;
&lt;strong&gt;FsUnit:&lt;/strong&gt;
&lt;br/&gt;&lt;br/&gt;
FsUnit has also had a few enhancements.
&lt;br/&gt;&lt;br/&gt;
1. Support for MsTest has been added for VS11 and made available through a new NuGet package named Fs30Unit.MsTest.
&lt;br/&gt;&lt;br/&gt;
2. A few new assertions have been added for NUnit including NaN, instanceOfType, and unique.
&lt;br/&gt;&lt;br/&gt;
3. FsUnit has long supported a function named "not". While this is a nice feature, the fact that it overwrites an F# operator is not ideal. Because of this, version 1.1.0.0 renames this function to not'. For the purpose of backward compatibility, you can open the module named FsUnitDepricated to make the "not" function available.
&lt;br/&gt;&lt;br/&gt;
One last thing. If you're using FsUnit with NUnit, MbUnit, or xUnit in VS11 Beta, you will need to add binding redirects from previous versions of FSharp.Core to version 4.3.0.0. The easiest way to do this is to use the Add-BindingRedirect PowerShell cmdlet provided by NuGet (&lt;a href="http://docs.nuget.org/docs/reference/package-manager-console-powershell-reference"&gt;http://docs.nuget.org/docs/reference/package-manager-console-powershell-reference&lt;/a&gt;). Here are the steps:
&lt;br/&gt;&lt;br/&gt;
1. After installing one of the FsUnit NuGet packages, create an App.config file (if one doesn't already exist).
&lt;br/&gt;&lt;br/&gt;
2. In the NuGet Package Manager Console, run the following command "Add-BindingRedirect &lt;em&gt;projectname&lt;/em&gt;" after replacing &lt;em&gt;projectname&lt;/em&gt; with the name of your test project.&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-8094672180152921016?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/8094672180152921016/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2012/04/f-mstest-and-fsunit-1100.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/8094672180152921016?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/8094672180152921016?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/AxJMM6qm17c/f-mstest-and-fsunit-1100.html" title="F#, MSTest, and FsUnit 1.1.0.0" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2012/04/f-mstest-and-fsunit-1100.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIHR3c6cSp7ImA9WhVRF0s.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-6219539307191973145</id><published>2012-03-26T04:48:00.000-07:00</published><updated>2012-03-26T04:48:56.919-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-26T04:48:56.919-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WPF" /><category scheme="http://www.blogger.com/atom/ns#" term="FSharpx" /><category scheme="http://www.blogger.com/atom/ns#" term="TypeProvider" /><category scheme="http://www.blogger.com/atom/ns#" term="XAML" /><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><category scheme="http://www.blogger.com/atom/ns#" term="Project Templates" /><title>A Nice Addition to the Empty WPF F# Template</title><content type="html">A few days ago Steffen Formann &lt;a href="http://www.navision-blog.de/2012/03/22/wpf-designer-for-f/"&gt;announced a Xaml type provider&lt;/a&gt; that he and Johann Deneux have created that makes writing WPF apps in F# very easy. This type provider allows strongly typed access to the XAML, effectively providing the missing piece to allowing full F# WPF designer support. I've now updated the Empty WPF F# Template to include this type provider.
&lt;br /&gt;
&lt;br /&gt;
To use it, all you have to due is download/install the latest version of the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/e0907c99-bb04-4eb8-9692-9333d5ff4399"&gt;F# Empty Windows App (WPF)&lt;/a&gt; template in VS11. This will generate an F# project with all the needed WPF assembly references. It also automatically installs the FSharpx.TypeProviders NuGet package and provides the starting point for creating WPF apps with the new Xaml type provider.
&lt;br /&gt;
&lt;br /&gt;
Here's a screenshot that's pretty similar to what Steffen showed in the announcement post. Note: The button and label were manually added after creating the project from the updated template.
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2012/03/FsWpfEmptyWithNewDesigner.png"&gt;&lt;img alt="" class="aligncenter size-full wp-image-653" height="252" src="http://freshbrewedcode.com/danmohl/files/2012/03/FsWpfEmptyWithNewDesigner.png" title="FsWpfEmptyWithNewDesigner" width="536" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
One other piece that can be helpful when creating WPF apps in F# is the XAML related item templates (i.e. Page, User Control, Window, etc). Item templates are provided via the F# XAML Item Templates extension found at &lt;a href="http://visualstudiogallery.msdn.microsoft.com/06c6ece1-2084-4083-a0f7-934fce9d22fb"&gt;http://visualstudiogallery.msdn.microsoft.com/06c6ece1-2084-4083-a0f7-934fce9d22fb&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-6219539307191973145?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/6219539307191973145/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2012/03/nice-addition-to-empty-wpf-f-template.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/6219539307191973145?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/6219539307191973145?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/8vbNrY0sCcY/nice-addition-to-empty-wpf-f-template.html" title="A Nice Addition to the Empty WPF F# Template" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2012/03/nice-addition-to-empty-wpf-f-template.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0ICRX08eyp7ImA9WhVSGUU.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-3006263585522450211</id><published>2012-03-17T04:56:00.001-07:00</published><updated>2012-03-17T04:59:24.373-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-17T04:59:24.373-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="CoffeeScript" /><category scheme="http://www.blogger.com/atom/ns#" term="Presentation" /><title>Presentation - CoffeeScript: Good, Bold, and with Sugar</title><content type="html">Thanks to all who came out to my talk yesterday at Code PaLOUsa. As mentioned, the slides for the presentation are provided below. 
You can find the slides + examples at &lt;a href="https://github.com/dmohl/CoffeeScriptGoodBoldAndWithSugar"&gt;https://github.com/dmohl/CoffeeScriptGoodBoldAndWithSugar&lt;/a&gt; and navigate the deck at &lt;a href="http://206.72.113.77/Presentations/Deck.js/CoffeeScript-Good%20Bold%20and%20with%20Sugar/Index.html"&gt;Slides&lt;/a&gt;
&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-3006263585522450211?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/3006263585522450211/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2012/03/presentation-coffeescript-good-bold-and.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/3006263585522450211?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/3006263585522450211?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/TNWcydsH8rs/presentation-coffeescript-good-bold-and.html" title="Presentation - CoffeeScript: Good, Bold, and with Sugar" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2012/03/presentation-coffeescript-good-bold-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QCRHk4eCp7ImA9WhVTGUg.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-6447088892761487454</id><published>2012-03-05T04:42:00.000-08:00</published><updated>2012-03-05T04:42:45.730-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-05T04:42:45.730-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET Web API" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET MVC 4" /><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><title>F# and ASP.NET Web API</title><content type="html">A few weeks ago the ASP.NET team announced the release of ASP.NET MVC 4 Beta. You can read about it &lt;a href="http://weblogs.asp.net/jgalloway/archive/2012/02/16/asp-net-4-beta-released.aspx"&gt;here&lt;/a&gt;. One of the exciting features that was announced is ASP.NET Web API. ASP.NET Web API provides an excellent programming model for building HTTP services.
&lt;br /&gt;
&lt;br /&gt;
One of the sweet spots for F# is in the services layer and this makes ASP.NET Web API + F# great friends. To make it easy to get started with F# and ASP.NET Web API, I've added an ASP.NET Web API template to the already existing &lt;a href="http://visualstudiogallery.msdn.microsoft.com/3d2bf938-fc9e-403c-90b3-8de27dc23095"&gt;F#/C# ASP.NET MVC 4 Visual Studio extension&lt;/a&gt;.&amp;nbsp;Note: The template requires that ASP.NET MVC 4 Beta is installed.
&lt;br /&gt;
&lt;br /&gt;
To install the template, do the following:
&lt;br /&gt;
&lt;br /&gt;
1. Launch the project creation wizard (Ctrl+Shift+N), select Online in the left hand nav, search for "fsharp mvc4", and click OK. In VS11 Beta, it looks something like the following. Note: It may take a few seconds to download.
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2012/03/FsCsMvc4Vs11.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" class="aligncenter size-full wp-image-629" height="343" src="http://freshbrewedcode.com/danmohl/files/2012/03/FsCsMvc4Vs11.png" title="FsCsMvc4Vs11" width="573" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
2. After clicking OK and installing the extension, you will see a dialog that allows the creation of a new ASP.NET Web API solution with an F# project that contains the server-side code.
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2012/03/FsMvc4WebApi.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" class="aligncenter size-full wp-image-630" height="350" src="http://freshbrewedcode.com/danmohl/files/2012/03/FsMvc4WebApi.png" title="FsMvc4WebApi" width="524" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
3. Once the project has been created, you can run it however you desire and hit the service via http://localhost:###/api/values.
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-6447088892761487454?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/6447088892761487454/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2012/03/f-and-aspnet-web-api.html#comment-form" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/6447088892761487454?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/6447088892761487454?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/aWnAwyuGV4o/f-and-aspnet-web-api.html" title="F# and ASP.NET Web API" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>7</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2012/03/f-and-aspnet-web-api.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUCRH87eip7ImA9WhVTE0k.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-5107329370881724038</id><published>2012-02-27T04:54:00.000-08:00</published><updated>2012-02-27T04:54:25.102-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-27T04:54:25.102-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET MVC 3" /><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><category scheme="http://www.blogger.com/atom/ns#" term="Project Templates" /><title>Razor Added to the F#/C# ASP.NET MVC 3 Internet Project Template</title><content type="html">There's a new version of the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/f57aa816-e96b-4133-ab5d-9b9b99914ead"&gt;F#/C# ASP.NET MVC 3 internet Project Template&lt;/a&gt;. This version allows you to choose between the ASPX and Razor view engines.&lt;br /&gt;
&lt;br /&gt;
Here's how to use it:&lt;br /&gt;
&lt;br /&gt;
1. Install version 1.6+ of the project template by searching for it on Visual Studio Gallery and/or updating a version that you had previously installed.&lt;br /&gt;
&lt;br /&gt;
2. Create a new project.&lt;br /&gt;
&lt;br /&gt;
3. You will now see a dialog box similar to what is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2012/02/FsInternetMVC3.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" class="aligncenter size-full wp-image-611" height="352" src="http://freshbrewedcode.com/danmohl/files/2012/02/FsInternetMVC3.jpg" title="FsInternetMVC3" width="525" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
While it's certainly not required in order to use this template, you can see the full source on my &lt;a href="https://github.com/dmohl/FSharpMVC3Starter"&gt;GitHub&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-5107329370881724038?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/5107329370881724038/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2012/02/razor-added-to-fc-aspnet-mvc-3-internet.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/5107329370881724038?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/5107329370881724038?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/qNc9tagkWuk/razor-added-to-fc-aspnet-mvc-3-internet.html" title="Razor Added to the F#/C# ASP.NET MVC 3 Internet Project Template" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2012/02/razor-added-to-fc-aspnet-mvc-3-internet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8NQHc7eip7ImA9WhRaF0k.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-66825206537762634</id><published>2012-02-20T05:01:00.000-08:00</published><updated>2012-02-20T05:01:31.902-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-20T05:01:31.902-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="CoffeeScript" /><category scheme="http://www.blogger.com/atom/ns#" term="Mocha" /><category scheme="http://www.blogger.com/atom/ns#" term="Zombie.js" /><category scheme="http://www.blogger.com/atom/ns#" term="Node.js" /><category scheme="http://www.blogger.com/atom/ns#" term="ExpectThat" /><title>ExpectThat with CoffeeScript, Zombie, Mocha, and Node</title><content type="html">&lt;a href="http://bloggemdano.blogspot.com/2012/01/testing-jquery-plugin-with-expectthat.html"&gt;A few posts ago&lt;/a&gt;, I showed how to use &lt;a href="https://github.com/dmohl/expectThat"&gt;ExpectThat&lt;/a&gt; with Mocha and Node.js. Today, I'll show a simple example of using ExpectThat with &lt;a href="http://zombie.labnotes.org/"&gt;Zombie.js&lt;/a&gt;--a full-stack testing framework.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Zombie.js&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Zombie.js is a fast, headless testing framework that provides various functionality to write tests that hit your full technology stack. While I generally prefer to write more fine-grained, isolated tests, it's important to also have a few smoke tests and/or integration tests to verify end-to-end functionality. Zombie makes these kinds of tests easy, while allowing me to still use ExpectThat and Mocha.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;The Example&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Here's a simple example that populates two input elements and then&amp;nbsp;verifies&amp;nbsp;that the values of those input fields contain the expected text.&lt;br/&gt;&lt;br/&gt;

&lt;script src="https://gist.github.com/1860490.js?file=expectThat_Zombie.coffee"&gt;
&lt;/script&gt;
&lt;br/&gt;
You can find the full example &lt;a href="https://github.com/dmohl/expectThat/tree/master/example/mocha-zombie"&gt;here&lt;/a&gt;.
&lt;br/&gt;&lt;br/&gt;
After a few commands such as " coffee --output lib/ specs/ " and " mocha 'lib/example.spec.js' --reporter spec ", you should see an output that looks something like this:
&lt;br/&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2012/02/Screen-Shot-2012-02-19-at-7.32.46-AM.png"&gt;&lt;img class="aligncenter size-full wp-image-600" title="ZombieExampleScreenShot" src="http://freshbrewedcode.com/danmohl/files/2012/02/Screen-Shot-2012-02-19-at-7.32.46-AM.png" alt="" width="555" height="89" /&gt;&lt;/a&gt;
&lt;br/&gt;&lt;br/&gt;
To learn more about ExpectThat, visit &lt;a href="https://github.com/dmohl/expectThat"&gt;https://github.com/dmohl/expectThat&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-66825206537762634?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/66825206537762634/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2012/02/expectthat-with-coffeescript-zombie.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/66825206537762634?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/66825206537762634?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/XWJMKUuzuok/expectthat-with-coffeescript-zombie.html" title="ExpectThat with CoffeeScript, Zombie, Mocha, and Node" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2012/02/expectthat-with-coffeescript-zombie.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8MR306eyp7ImA9WhRbFU4.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-7274252990381569547</id><published>2012-02-06T04:54:00.000-08:00</published><updated>2012-02-06T04:54:46.313-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-06T04:54:46.313-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WPF" /><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><category scheme="http://www.blogger.com/atom/ns#" term="Project Templates" /><title>Another Way To Kick-start F# WPF Apps</title><content type="html">Over the last few years I've announced &lt;a href="http://visualstudiogallery.msdn.microsoft.com/site/search?query=mohl&amp;amp;f%5B0%5D.Value=mohl&amp;amp;f%5B0%5D.Type=SearchText&amp;amp;ac=8"&gt;a number of project templates that are available on Visual Studio Gallery&lt;/a&gt;. A few of these have provided ways to kick-start F# WPF apps. I talked about one of these templates &lt;a href="http://bloggemdano.blogspot.com/2010/06/f-wpf-mvvm-project-template.html"&gt;here&lt;/a&gt;. While these are nice for getting acquainted with building WPF apps in F# and/or F#+C#, the files needed for the included sample app may become a bother once you have a few of these apps under your belt. Because of this, I've released an F# only Empty WPF project template (an F#/C# Empty WPF template will likely be coming soon).&lt;br /&gt;
&lt;br /&gt;
To get the new template, do the following:&lt;br /&gt;
&lt;br /&gt;
1. In Visual Studio 2010 or 11, navigate to File -&amp;gt; New and select Online Templates (or just Online if using VS11).&lt;br /&gt;
&lt;br /&gt;
2. Search for "Daniel Mohl" or "F# Empty Windows App" as shown below:
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2012/02/FsWpfEmptyTemplate.png"&gt;&lt;img alt="" class="aligncenter size-full wp-image-574" height="313" src="http://freshbrewedcode.com/danmohl/files/2012/02/FsWpfEmptyTemplate.png" title="FsWpfEmptyTemplate" width="520" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
3. Select the template, click OK, and agree to the install.&lt;br /&gt;
&lt;br /&gt;
While it's certainly not required to use the template, you can find the full source on my &lt;a href="https://github.com/dmohl"&gt;GitHub&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-7274252990381569547?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/7274252990381569547/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2012/02/another-way-to-kick-start-f-wpf-apps.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/7274252990381569547?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/7274252990381569547?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/totUh2AtXaY/another-way-to-kick-start-f-wpf-apps.html" title="Another Way To Kick-start F# WPF Apps" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2012/02/another-way-to-kick-start-f-wpf-apps.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMBQng5fyp7ImA9WhRUGU8.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-7048383568041839168</id><published>2012-01-30T04:15:00.000-08:00</published><updated>2012-01-30T04:27:33.627-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T04:27:33.627-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="CoffeeScript" /><category scheme="http://www.blogger.com/atom/ns#" term="Mocha" /><category scheme="http://www.blogger.com/atom/ns#" term="Node.js" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><category scheme="http://www.blogger.com/atom/ns#" term="ExpectThat" /><title>Testing a jQuery Plugin with ExpectThat and Mocha</title><content type="html">A couple of weeks ago, I &lt;a href="http://bloggemdano.blogspot.com/2012/01/introducing-expectthat-coffeescript.html"&gt;announced a CoffeeScript/JavaScript assertion library called ExpectThat&lt;/a&gt;. In this post, I'll provide a more real-world example of how ExpectThat can be used. For this example, I'll be using the jQuery plugin and tests from one of Josh Bush's posts entitled "&lt;a href="http://digitalbush.com/2011/03/29/testing-jquery-plugins-with-node-js-and-jasmine/"&gt;Testing jQuery Plugins with Node.js and Jasmine&lt;/a&gt;".&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;The jQuery plugin&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
The code that follows is a re-write (in CoffeeScript) of the simple jQuery plugin that Josh provided in his post.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1694545.js?file=placeholder.coffee"&gt;
&lt;/script&gt;
This jQuery plugin provides a basic watermark type of feature for an input box.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;The specs&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Since Josh has already done the work of writing the specs for this jQuery plugin, all that I need to do is port this to CoffeeScript and add in ExpectThat. To mix things up a bit, I've chosen to use &lt;a href="http://visionmedia.github.com/mocha/"&gt;Mocha&lt;/a&gt; instead of Jasmine (though ExpectThat works just as well for Jasmine). For simplicity, I've combined the spec files from Josh's post.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1694601.js?file=placeholder.spec.coffee"&gt;
&lt;/script&gt;
&lt;strong&gt;Apples to apples&lt;/strong&gt;&amp;nbsp;
&lt;br /&gt;
&lt;br /&gt;
Here's a quick before and after comparison (with both examples in CoffeeScript):&lt;br /&gt;
&lt;br /&gt;
Before ExpectThat:
&lt;br /&gt;
&lt;pre class="f-sharp" name="code"&gt;    describe "when calling placeholder plugin", -&amp;gt;
      it "should show placeholder value", -&amp;gt;
        expect(input.val()).toEqual("foo")&lt;/pre&gt;
After ExpectThat:
&lt;br /&gt;
&lt;pre class="f-sharp" name="code"&gt;    describe "when calling placeholder plugin", -&amp;gt;
      expectThat -&amp;gt; input.val().should equal "foo"&lt;/pre&gt;
Josh's tests are already very readable, but by adding ExpectThat, I'm able to eliminate 1 line from every test and allow each to be self-documenting.&lt;br /&gt;
&lt;br /&gt;
An example of the result of running the specs in the browser is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2012/01/Mocha_jQueryPlugin_Tests_Screenschot.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" class="aligncenter size-full wp-image-564" height="310" src="http://freshbrewedcode.com/danmohl/files/2012/01/Mocha_jQueryPlugin_Tests_Screenschot.png" title="Mocha_jQueryPlugin_Tests_Screenschot" width="522" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Wait, what about Node?&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
"So", you say, "this is great, but Josh's post was all about using the same code and specs from the browser in Node.js". Ah, yes, thanks for reminding me. It's pretty simple to run these same specs in Node.&lt;br /&gt;
&lt;br /&gt;
Here are the steps:
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: left;"&gt;
1. Use NPM to install mocha at a global level (i.e. npm install mocha -g) then install jsdom, jquery, and expectThat.mocha at the local level (i.e. npm install &amp;lt;package name&amp;gt;).&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
2. Create a file called runspecs.coffee with the code shown below and compile it however you choose (i.e. "coffee --compile --output lib/ specs/").&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1694930.js?file=runspecs.coffee"&gt;
&lt;/script&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
3. Run the tests with a command such as "mocha 'lib/runspecs.js' --reporter spec" and you should see something like the following:
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2012/01/expectThat.Mocha_.Screenshot.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" class="aligncenter size-full wp-image-408" height="288" src="http://freshbrewedcode.com/danmohl/files/2012/01/expectThat.Mocha_.Screenshot.png" title="expectThat.Mocha.Screenshot" width="410" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
In future posts, I'll show how to do similar testing with other tools such as Jasmine-Node and Zombie.js. To learn more about ExpectThat, get involved, and/or keep an eye on its progress, go to &lt;a href="https://github.com/dmohl/expectThat"&gt;https://github.com/dmohl/expectThat&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-7048383568041839168?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/7048383568041839168/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2012/01/testing-jquery-plugin-with-expectthat.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/7048383568041839168?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/7048383568041839168?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/5OlDZ8zgsBg/testing-jquery-plugin-with-expectthat.html" title="Testing a jQuery Plugin with ExpectThat and Mocha" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2012/01/testing-jquery-plugin-with-expectthat.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkAESHw4fSp7ImA9WhRUE08.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-318149518993487061</id><published>2012-01-23T05:18:00.000-08:00</published><updated>2012-01-23T05:18:29.235-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-23T05:18:29.235-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WPF" /><category scheme="http://www.blogger.com/atom/ns#" term="XAML" /><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone 7" /><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight" /><title>Making F# Windows Phone Development a Little Easier</title><content type="html">About a month ago, I &lt;a href="http://freshbrewedcode.com/danmohl/2011/11/25/building-f-solutions-in-visual-studio-11/"&gt;announced&lt;/a&gt; that most of the existing &lt;a href="http://visualstudiogallery.msdn.microsoft.com/site/search?query=mohl&amp;amp;f%5B0%5D.Value=mohl&amp;amp;f%5B0%5D.Type=SearchText&amp;amp;ac=8"&gt;F# project templates on Visual Studio Gallery&lt;/a&gt;&amp;nbsp;had been updated to include support for Visual Studio 11. In that post, I mentioned some new item templates that had been included in the update to the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/06c6ece1-2084-4083-a0f7-934fce9d22fb"&gt;F# XAML Item Templates&lt;/a&gt;&amp;nbsp;extension. This post provides a bit more information related to that update.&lt;br /&gt;
&lt;br /&gt;
The F# XAML Item Templates&amp;nbsp;extension was designed to make working with F# + WPF&amp;nbsp;and Silverlight a little eaiser. I provided a &lt;a href="http://bloggemdano.blogspot.com/2011/06/f-xaml-item-templates-now-on-visual.html"&gt;brief overview of these features back in June&lt;/a&gt;. However, Windows Phone XAML related development was still lacking. The previous approach to adding XAML files was to either create a blank file, change the extension, and manually add the appropriate starting XAML or create the XAML from one of the C# item templates, remove the code-behind files, and tweak the resulting XAML. While neither of these options is extremely time consuming, it can quickly become annoying.&lt;br /&gt;
&lt;br /&gt;
The latest update to &lt;a href="http://visualstudiogallery.msdn.microsoft.com/06c6ece1-2084-4083-a0f7-934fce9d22fb"&gt;this&lt;/a&gt;&amp;nbsp;Visual Studio extension reduces this annoyance by providing F# Windows Phone 7 XAML item templates. Once this VSIX is installed, you can add a Windows Phone 7 XAML file by doing the following:&lt;br /&gt;
&lt;br /&gt;
1. In a Windows Phone F# project, proceed with adding a new item as you normally would (i.e. Ctrl+Shift+A).&lt;br /&gt;
&lt;br /&gt;
2. The resulting wizard (shown below) includes several new item templates starting with "F#..." that match the C# versions, but that do not generate C# code-behind files.&lt;span style="text-align: center;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="text-align: center;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2011/12/FsWp7ItemTemplates.png"&gt;&lt;img alt="" class="aligncenter size-full wp-image-210" height="355" src="http://freshbrewedcode.com/danmohl/files/2011/12/FsWp7ItemTemplates.png" title="FsWp7ItemTemplates" width="574" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
While you still have to write the small amount of F# code to wire this up, it makes life a little bit easier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-318149518993487061?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/318149518993487061/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2011/11/making-f-windows-phone-development.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/318149518993487061?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/318149518993487061?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/anx28DI5RSo/making-f-windows-phone-development.html" title="Making F# Windows Phone Development a Little Easier" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2011/11/making-f-windows-phone-development.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cNRXs9fip7ImA9WhRVF04.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-8496541459622110064</id><published>2012-01-16T08:24:00.000-08:00</published><updated>2012-01-16T08:24:54.566-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-16T08:24:54.566-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="FSharpx" /><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><title>developerFusion Article: An Introduction to FSharpx</title><content type="html">My article entitled "An Introduction to FSharpx" was published a few days ago. You can find it at&amp;nbsp;&lt;a href="http://www.developerfusion.com/article/136179/an-introduction-to-fsharpx"&gt;http://www.developerfusion.com/article/136179/an-introduction-to-fsharpx&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
As mentioned in the article, FSharpx is continually evolving and several new features have been added since I submitted this article. Be sure to head over to the &lt;a href="https://github.com/fsharp/fsharpx"&gt;FSharpx GitHub site&lt;/a&gt; to see what's new.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-8496541459622110064?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/8496541459622110064/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2012/01/developerfusion-article-introduction-to.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/8496541459622110064?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/8496541459622110064?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/SZCDqRwHIxw/developerfusion-article-introduction-to.html" title="developerFusion Article: An Introduction to FSharpx" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2012/01/developerfusion-article-introduction-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMNRXg5eSp7ImA9WhRVEUw.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-5036166647531153714</id><published>2012-01-08T09:29:00.000-08:00</published><updated>2012-01-09T05:08:14.621-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-09T05:08:14.621-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="CoffeeScript" /><category scheme="http://www.blogger.com/atom/ns#" term="QUnit" /><category scheme="http://www.blogger.com/atom/ns#" term="Pavlov" /><category scheme="http://www.blogger.com/atom/ns#" term="Jasmine" /><category scheme="http://www.blogger.com/atom/ns#" term="ExpectThat" /><title>Introducing ExpectThat: A CoffeeScript Assertion Library</title><content type="html">I'm a big fan of automated testing. In fact, on the rare&amp;nbsp;occasions that I don't write tests, I find that I can't shake the thought that something has been missed.&lt;br /&gt;
&lt;br /&gt;
As with all aspects of my coding efforts, I am constantly looking for ways to improve the process, make tests more readable, and reduce room for error. With these goals in mind, I'd like to introduce &lt;a href="https://github.com/dmohl/expectThat"&gt;ExpectThat&lt;/a&gt;.
&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;What is ExpectThat?&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
ExpectThat is an expressive, self-documenting, assertion library for CoffeeScript, that seeks to improve testing efforts with your favorite testing framework. It does this by providing a syntax similar to &lt;a href="http://freshbrewedcode.com/danmohl/2012/01/03/announcing-fsunit-1-0/"&gt;FsUnit&lt;/a&gt;&amp;nbsp;(a library for &lt;a href="http://msdn.microsoft.com/en-us/vstudio/hh388569"&gt;F#&lt;/a&gt;) that makes assertions more readable and then automatically translates that readable code into descriptive test output. This ensures that your test names always stay in sync with your tests and allows your code to speak for itself. ExpectThat currently supports Pavlov, QUnit, and Jasmine. Overtime, support for additional testing frameworks will be added.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Let's See it in Action&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
The following example shows how to write tests with ExpectThat for Pavlov in CoffeeScript:
&lt;br /&gt;
&lt;pre class="f-sharp" name="code"&gt;pavlov.specify "Example Specifications", -&amp;gt;
    foo = "bar"
    describe "When testing 'should equal'", -&amp;gt;
        expectThat -&amp;gt; foo.should equal "bar"
    describe "When testing 'shouldnt equal'", -&amp;gt;
        expectThat -&amp;gt; foo.shouldnt equal "baz"
    describe "When testing for 'true'", -&amp;gt;
        expectThat -&amp;gt; (foo is "bar").should be true
        expectThat -&amp;gt; (foo is "baz").shouldnt be true
    describe "When testing for 'false'", -&amp;gt;
        expectThat -&amp;gt; (foo is "baz").should be false
        expectThat -&amp;gt; (foo is "bar").shouldnt be false
    describe "When testing 'greater than'", -&amp;gt;
        expectThat -&amp;gt; (9.1).should be greaterThan 9
        expectThat -&amp;gt; (9.1).shouldnt be greaterThan 10
        expectThat -&amp;gt; 10.shouldnt be greaterThan 10&lt;/pre&gt;
Here's a screenshot of the result:
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2011/12/ExpectThatPavlovOutput1.png"&gt;&lt;img alt="" class="aligncenter size-full wp-image-312" height="316" src="http://freshbrewedcode.com/danmohl/files/2011/12/ExpectThatPavlovOutput1.png" title="ExpectThatPavlovOutput" width="565" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;strong&gt;Other Testing Frameworks&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
As I mentioned, ExpectThat currently supports QUnit and Jasmine in addition to Pavlov. The following are examples for each of these.&lt;br /&gt;
&lt;br /&gt;
QUnit:
&lt;br /&gt;
&lt;pre class="f-sharp" name="code"&gt;module "Example QUnit Specifications"

foo = "bar"

module "When testing should equal"

expectThat -&amp;gt; foo.should equal "bar"

module "When testing shouldnt equal"

expectThat -&amp;gt; foo.shouldnt equal "baz"

module "When testing for true"

expectThat -&amp;gt; (foo is "bar").should be true
expectThat -&amp;gt; (foo is "baz").shouldnt be true

module "When testing for false"

expectThat -&amp;gt; (foo is "baz").should be false
expectThat -&amp;gt; (foo is "bar").shouldnt be false&lt;/pre&gt;
Jasmine:&lt;br /&gt;
&lt;pre class="f-sharp" name="code"&gt;describe "Example Jasmine Specifications", -&amp;gt;
    foo = "bar"
    describe "When testing should equal", -&amp;gt;
        expectThat -&amp;gt; foo.should equal "bar"
    describe "When testing shouldnt equal", -&amp;gt;
        expectThat -&amp;gt; foo.shouldnt equal "baz"
    describe "When testing for throw", -&amp;gt;
        expectThat -&amp;gt; (-&amp;gt; throw "test exception").should throwException
        expectThat -&amp;gt; (-&amp;gt; throw "test").should throwException "test"
    describe "When testing for less than", -&amp;gt;
        expectThat -&amp;gt; 10.should be lessThan 11
        expectThat -&amp;gt; (10.1).shouldnt be lessThan 10&lt;/pre&gt;
&lt;strong&gt;Getting Started with ExpectThat&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
There are a couple of ways to get started with ExpectThat. First, head over to the &lt;a href="https://github.com/dmohl/expectThat"&gt;ExpectThat GitHub site&lt;/a&gt;&amp;nbsp;and browse through the documentation. You can then clone the repo and grab any of the examples from the &lt;a href="https://github.com/dmohl/expectThat/tree/master/example"&gt;example folder&lt;/a&gt;. If you are writing an ASP.NET app in Visual Studio, another option is to install one of the &lt;a href="http://nuget.org/packages?q=expectThat&amp;amp;sortOrder=package-download-count"&gt;available NuGet packages&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Available Assertions&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
ExpectThat currently provides the following assertions:&lt;br /&gt;
&lt;br /&gt;
- equal&lt;br /&gt;
- stictlyEqual&lt;br /&gt;
- false&lt;br /&gt;
- true&lt;br /&gt;
- greaterThan&lt;br /&gt;
- greaterThanOrEqual&lt;br /&gt;
- lessThan&lt;br /&gt;
- lessThanOrEqual&lt;br /&gt;
- throwException&lt;br /&gt;
- 'to' and 'be' can be used in most cases to make tests more readable.&lt;br /&gt;
&lt;br /&gt;
In addition to the out-of-the-box assertions, ExpectThat allows for the creation of custom assertions. Examples of this for each of the supported testing frameworks are available in the &lt;a href="https://github.com/dmohl/expectThat/tree/master/example"&gt;example folder on GitHub&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;ExpectThat in JavaScript&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
While the syntax of ExpectThat works best with CoffeeScript, you can certainly use it in JavaScript as well. Simply add in the missing braces, parens, semi-colons, function keywords, etc. The following provides a simple example for Pavlov:
&lt;br /&gt;
&lt;pre class="f-sharp" name="code"&gt;pavlov.specify("expectThat Specifications", function() {
    describe("When testing should equal", function() {
        var foo = "bar";
        expectThat(function() {
            foo.should(equal("bar"));
        });
        expectThat(function() {
            (foo + "test").should(equal("bartest"));
        });
    });
});&lt;/pre&gt;
&lt;strong&gt;Getting Involved&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
There are a lot of things left to do for ExpectThat and I'd love to hear your thoughts on direction, enhancements, etc. as well as have any help that anyone would like to offer. If you want to get involved, &lt;a href="https://github.com/dmohl/expectThat"&gt;fork me on GitHub&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-5036166647531153714?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/5036166647531153714/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2012/01/introducing-expectthat-coffeescript.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/5036166647531153714?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/5036166647531153714?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/KgvEa_DbuV0/introducing-expectthat-coffeescript.html" title="Introducing ExpectThat: A CoffeeScript Assertion Library" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2012/01/introducing-expectthat-coffeescript.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYAQnw8cSp7ImA9WhRWFk0.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-6778457927342066700</id><published>2011-12-25T13:31:00.000-08:00</published><updated>2012-01-03T06:49:03.279-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-03T06:49:03.279-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="xUnit.NET" /><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><category scheme="http://www.blogger.com/atom/ns#" term="NUnit" /><category scheme="http://www.blogger.com/atom/ns#" term="MbUnit" /><category scheme="http://www.blogger.com/atom/ns#" term="FsUnit" /><title>Announcing FsUnit 1.0</title><content type="html">A couple of weeks ago I &lt;a href="http://freshbrewedcode.com/danmohl/2011/12/06/enhancements-to-fsunit-version-0-9-1-1/"&gt;announced a few enhancements to FsUnit&lt;/a&gt;. Today, I'm proud to announce the &lt;a href="http://fsunit.codeplex.com/"&gt;release of FsUnit 1.0&lt;/a&gt;. Version 1.0 includes support for additional testing frameworks, a new assertion function, and more...&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;New Testing Framework Support:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
All previous releases of FsUnit provided support for only NUnit; however, the goal for FsUnit has always been to provide support for other major testing frameworks as well. This release largely accomplishes this goal by adding support for MbUnit version 3.3.454.0 and xUnit.NET version 1.8.0.1549. While the majority of functions provided for NUnit are also provided for these two testing frameworks, there are a couple of features that are not available. Each of these missing features can easily be worked around and the FsUnit unit tests provide examples of this.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;NuGet Packages:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
The easiest way to get started with FsUnit is to install one of the following NuGet packages.&lt;br /&gt;
&lt;br /&gt;
- FsUnit for NUnit can be installed via the original NuGet package ID of &lt;a href="http://www.nuget.org/packages/FsUnit"&gt;FsUnit&lt;/a&gt;.&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2011/12/NuGetPackageFsUnit.png"&gt;&lt;img alt="" class="aligncenter size-full wp-image-249" height="41" src="http://freshbrewedcode.com/danmohl/files/2011/12/NuGetPackageFsUnit.png" title="NuGetPackageFsUnit" width="444" /&gt;&lt;/a&gt;&lt;/div&gt;
- FsUnit for xUnit.NET can be installed via the &lt;a href="http://www.nuget.org/packages/FsUnit.xUnit"&gt;FsUnit.xUnit&lt;/a&gt;&amp;nbsp;package ID.&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2011/12/NuGetPackageFsUnitXUnit.png"&gt;&lt;img alt="" class="aligncenter size-full wp-image-250" height="41" src="http://freshbrewedcode.com/danmohl/files/2011/12/NuGetPackageFsUnitXUnit.png" title="NuGetPackageFsUnitXUnit" width="445" /&gt;&lt;/a&gt;&lt;/div&gt;
- FsUnit for MbUnit can be installed via the &lt;a href="http://www.nuget.org/packages/FsUnit.MbUnit"&gt;FsUnit.MbUnit&lt;/a&gt;&amp;nbsp;package ID.&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2011/12/NuGetPackageFsUnitMbUnit.png"&gt;&lt;img alt="" class="size-full wp-image-251 aligncenter" height="41" src="http://freshbrewedcode.com/danmohl/files/2011/12/NuGetPackageFsUnitMbUnit.png" title="NuGetPackageFsUnitMbUnit" width="445" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;strong&gt;Additional Assertion:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
In addition to support for MbUnit and xUnit.NET, the equalWithin function has been added. Thanks to &lt;a href="http://fsunit.codeplex.com/discussions/269320"&gt;erdoll&lt;/a&gt;&amp;nbsp;for requesting this enhancement and for providing much of the code for the NUnit implementation. The equalWithin function allows an equality assertion with a specified tolerance. Examples are provided below:&lt;br /&gt;
&lt;br /&gt;
NUnit Example:
&lt;br /&gt;
&lt;pre class="f-sharp" name="code"&gt;module Test.``equalWithin assertions``

open NUnit.Framework
open FsUnit

[&amp;lt;Test&amp;gt;]
let ``should equal within tolerance when less than``() =
    10.09 |&amp;gt; should (equalWithin 0.1) 10.11

[&amp;lt;Test&amp;gt;]
let ``should not equal within tolerance``() =
    10.1 |&amp;gt; should not ((equalWithin 0.001) 10.11)&lt;/pre&gt;
xUnit.NET Example:
&lt;br /&gt;
&lt;pre class="f-sharp" name="code"&gt;module Test.``equalWithin assertions``

open Xunit
open FsUnit.Xunit

[&amp;lt;Fact&amp;gt;]
let ``should equal within tolerance when less than``() =
    10.09 |&amp;gt; should (equalWithin 0.1) 10.11

[&amp;lt;Fact&amp;gt;]
let ``should not equal within tolerance``() =
    10.1 |&amp;gt; should not ((equalWithin 0.001) 10.11)&lt;/pre&gt;
MbUnit Example:
&lt;br /&gt;
&lt;pre class="f-sharp" name="code"&gt;module Test.``equalWithin assertions``

open MbUnit.Framework
open FsUnit.MbUnit

[&amp;lt;Test&amp;gt;]
let ``should equal within tolerance when less than``() =
    10.09 |&amp;gt; should (equalWithin 0.1) 10.11

[&amp;lt;Test&amp;gt;]
let ``should not equal within tolerance``() =
    10.1 |&amp;gt; should not ((equalWithin 0.001) 10.11)&lt;/pre&gt;
&lt;strong&gt;Now on GitHub:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Last but not least, an FsUnit GitHub site is now available at &lt;a href="https://github.com/dmohl/FsUnit"&gt;https://github.com/dmohl/FsUnit&lt;/a&gt;. FsUnit has had several contributors with submissions ranging from inception and NUnit implementation by &lt;a href="http://www.linkedin.com/pub/ray-vernagus/2b/825/b1a"&gt;Ray Vernagus&lt;/a&gt;, to major and minor enhancements, to examples and documentation. I hope that this move to GitHub will spur additional collaboration. The GitHub site will now act as the primary place for development and collaboration, while the &lt;a href="http://fsunit.codeplex.com/"&gt;CodePlex site&lt;/a&gt;&amp;nbsp;will house major releases. We would love to have additional features and contributors, so jump on over and submit a pull request.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;On to the Next One...&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
We are already working on the next release of FsUnit. &lt;a href="https://twitter.com/#!/rodrigovidal"&gt;Rodrigo Vidal&lt;/a&gt; has submitted a few new NUnit assertions--which will be ported to the MbUnit and xUnit.NET implementations where possible. Additionally, there have been discussions of pulling in &lt;a href="https://twitter.com/#!/ptrelford"&gt;Phillip Trelford&lt;/a&gt;'s &lt;a href="https://bitbucket.org/ptrelford/fock"&gt;F# friendly Mocking library&lt;/a&gt;.&amp;nbsp;
&lt;br /&gt;
&lt;br /&gt;
Where would you like to see FsUnit go? We'd love to hear from you!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-6778457927342066700?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/6778457927342066700/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2011/12/announcing-fsunit-10.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/6778457927342066700?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/6778457927342066700?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/oy7xL4Vgywo/announcing-fsunit-10.html" title="Announcing FsUnit 1.0" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2011/12/announcing-fsunit-10.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMER3c5eSp7ImA9WhRQGEU.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-8002547815666184512</id><published>2011-12-10T09:18:00.001-08:00</published><updated>2011-12-14T10:30:06.921-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-14T10:30:06.921-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><title>Porting Bryan's Erlang Function to F#</title><content type="html">A week or two ago, Fresh Brewed Coder Bryan Hunter &lt;a href="http://freshbrewedcode.com/bryanhunter/2011/11/27/debugging-erlang/"&gt;posted a video to explain how to debug Erlang apps&lt;/a&gt;. In the tutorial, he stepped through a recursive function to display the various concepts. I thought it would be interesting to take that simple example and explore a few ways to write it in F#.

Let's start by reviewing Bryan's example (which calculates the average of a provided list of number).&lt;br /&gt;
&lt;br /&gt;
Here's what his average.erl source file looks like:
&lt;br /&gt;
&lt;pre class="f-sharp" name="code"&gt;-module(average).

-export([calculate/1]).

calculate(X) -&amp;gt;
     calculate(X,0,0).

calculate([H|T], Length, Sum) -&amp;gt;
     calculate(T, Length+1, Sum+H);

calculate([], Length, Sum) -&amp;gt;
     Sum/Length.&lt;/pre&gt;
&lt;strong&gt;Porting the Code to F#:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
So how would you write this in F#? As with any language, there are several options. A fairly straight forward port might look like this:
&lt;br /&gt;
&lt;pre class="f-sharp" name="code"&gt;let calculate x =
    let rec calc list length sum =
        match list with
        | head :: tail -&amp;gt; calc tail (length+1) (sum+head)
        | [] -&amp;gt; sum/length
    calc x 0 0
printfn "Value is %O" (calculate [10;22])&lt;/pre&gt;
&lt;strong&gt;Breaking it Down:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
The above code defines the calculate function that takes a list of&amp;nbsp;integers as a single argument.&lt;br /&gt;
&lt;br /&gt;
Next, a recursive function (the "rec" keyword indicates that it is recursive) named calc is defined (line 2). This function takes a list of integers as the first argument, the current length as the second argument, and the current sum as the last argument.&lt;br /&gt;
&lt;br /&gt;
At the heart of this recursive function is a pattern match against the provided list (line 3). Using something known as the &lt;a href="http://msdn.microsoft.com/en-us/library/dd547125.aspx"&gt;cons pattern&lt;/a&gt;, the first pattern (line 4) attempts to decompose the provided list into a "head" (the first element in the list) and "tail"&amp;nbsp;(the rest of the elements).&lt;br /&gt;
&lt;br /&gt;
If the first pattern is a match, the calc function is called with the "tail" list as the first argument, the length value incremented by 1 as the second argument, and the result of the sum value combined with the first value from the list (i.e. the head) as the third argument. This continues until the list is empty, at which point the cons pattern no longer results in a match and the second pattern is evaluated.&lt;br /&gt;
&lt;br /&gt;
By the time the second pattern (line 5) is evaluated, the match will succeed due to the list now being empty.&amp;nbsp;This causes the average to be calculated (i.e. sum/length) and returned.&lt;br /&gt;
&lt;br /&gt;
Line 6 kicks off the initial call to the calc recursive function with the initial list as the first argument and default length and sum values of 0.&lt;br /&gt;
&lt;br /&gt;
Finally, the last line (line 7) kicks off the whole thing with the call to calculate the average of the numbers 10 and 22 (as used in Bryan's demo).&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Another Approach:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
While &amp;nbsp;the approach above is pretty compact, F# provides a library that contains a high-order function that makes this even easier. The following line of code will also calculate the average of the values in a list of integers:
&lt;br /&gt;
&lt;pre class="f-sharp" name="code"&gt;[10;22] |&amp;gt; List.averageBy (fun number -&amp;gt; float number)&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-8002547815666184512?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/8002547815666184512/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2011/12/porting-bryans-erlang-function-to-f.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/8002547815666184512?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/8002547815666184512?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/_vMB38f_JOs/porting-bryans-erlang-function-to-f.html" title="Porting Bryan's Erlang Function to F#" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2011/12/porting-bryans-erlang-function-to-f.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUACR3YyeSp7ImA9WhRQEUo.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-8345149735946974722</id><published>2011-12-01T21:21:00.001-08:00</published><updated>2011-12-06T05:22:46.891-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-06T05:22:46.891-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><category scheme="http://www.blogger.com/atom/ns#" term="FsUnit" /><title>Enhancements to FsUnit (version 0.9.1.1)</title><content type="html">A &lt;a href="http://nuget.org/List/Packages/FsUnit"&gt;new version (0.9.1.1) of FsUnit&lt;/a&gt; -- a DSL for writing unit tests in F# -- is now available on the &lt;a href="http://nuget.org/List/Packages/FsUnit"&gt;NuGet gallery&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
This version includes the following improvements:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;- Libraries for frameworks 3.5 and 4.0.&lt;br /&gt;
&amp;nbsp;- Support for NUnit version 2.5.10.11092.&lt;br /&gt;
&amp;nbsp;- Several new functions including: greaterThan,&amp;nbsp;greaterThanOrEqualTo,&amp;nbsp;lessThan,&amp;nbsp;lessThanOrEqualTo,&amp;nbsp;shouldFail,&amp;nbsp;endWith, startWith, and&amp;nbsp;ofExactType.&lt;br /&gt;
&lt;br /&gt;
Examples of the functions mentioned above are shown below:&lt;br /&gt;
&lt;pre class="f-sharp" name="code"&gt;module FsUnit.``Given a bunch of random tests``

open NUnit.Framework
open FsUnit

[&amp;lt;Test&amp;gt;]
let ``When 11 it should be greater than 10``() =
    11 |&amp;gt; should be (greaterThan 10)

[&amp;lt;Test&amp;gt;]
let ``When 11 it should be greater than or equal to 10``() =
    11 |&amp;gt; should be (greaterThanOrEqualTo 10)

[&amp;lt;Test&amp;gt;]
let ``When 10 it should be less than 11``() =
    10 |&amp;gt; should be (lessThan 11)

[&amp;lt;Test&amp;gt;]
let ``When 10 it should be less than or equal to 11``() =
    10 |&amp;gt; should be (lessThanOrEqualTo 11)

[&amp;lt;Test&amp;gt;]
let ``When an empty List it should fail to contain item``() =
    shouldFail (fun () -&amp;gt; [] |&amp;gt; should contain 1)

[&amp;lt;Test&amp;gt;]
let ``When fsharp it should end with rp``() =
    "fsharp" |&amp;gt; should endWith "rp"

[&amp;lt;Test&amp;gt;]
let ``When fsharp it should start with fs``() =
    "fsharp" |&amp;gt; should startWith "fs"

[&amp;lt;Test&amp;gt;]
let ``When 1 it should be of exact type int``() =
    1 |&amp;gt; should be ofExactType&amp;lt;int&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
An example of what this looks like when run in Resharper's Test Runner is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2011/12/FsUnitExample.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" class="aligncenter size-medium wp-image-130" height="225" src="http://freshbrewedcode.com/danmohl/files/2011/12/FsUnitExample-300x225.png" title="FsUnitExample" width="300" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
A Side Note: If you haven't written many tests in F#, the lack of spaces in the test names may surprise you. This is a feature of F# that allows almost any sequence of characters to be enclosed in double-backtick characters (i.e. ``) and consequently treated as an identifier.&lt;br /&gt;
&lt;br /&gt;
I hope you enjoy the latest enhancements to FsUnit. You can find the full source at &lt;a href="http://fsunit.codeplex.com/"&gt;http://fsunit.codeplex.com/&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-8345149735946974722?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/8345149735946974722/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2011/12/enhancements-to-fsunit-version-0911.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/8345149735946974722?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/8345149735946974722?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/XYi26XGUqF4/enhancements-to-fsunit-version-0911.html" title="Enhancements to FsUnit (version 0.9.1.1)" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2011/12/enhancements-to-fsunit-version-0911.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcNQX08fCp7ImA9WhRRF0U.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-3726823759522866256</id><published>2011-12-01T17:05:00.001-08:00</published><updated>2011-12-01T17:08:10.374-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-01T17:08:10.374-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET MVC 4" /><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><category scheme="http://www.blogger.com/atom/ns#" term="Project Templates" /><title>Building an ASP.NET MVC 4 Solution with F# and C#</title><content type="html">There is a &lt;a href="http://visualstudiogallery.msdn.microsoft.com/3d2bf938-fc9e-403c-90b3-8de27dc23095"&gt;new project template&lt;/a&gt; available on Visual Studio Gallery for creating &lt;a href="http://www.asp.net/mvc/mvc4"&gt;ASP.NET MVC 4&lt;/a&gt; solutions with F# and C#. The current release of this project template allows creation of an empty ASP.NET MVC 4 web application (either ASPX or Razor), a F# project for controllers/models/etc., and an optional F# project that can be used to contain unit tests. The project creation wizard dialog box is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2011/11/FsCsMvc4ProjWizDialog.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" class="aligncenter size-medium wp-image-36" height="199" src="http://freshbrewedcode.com/danmohl/files/2011/11/FsCsMvc4ProjWizDialog-300x199.png" title="F# and C# ASP.NET MVC 4 Project Creation Wizard Dialog" width="300" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In the future, this template will be extended to include at least one additional project type.&lt;br /&gt;
&lt;br /&gt;
To get the template, do the following (Note: Visual Studio 2010/11 Professional (or above) is required to use this template.):&lt;br /&gt;
&lt;br /&gt;
1. In Visual Studio, navigate to File | New and select Online Templates.&lt;br /&gt;
&lt;br /&gt;
2. Search for "fsharp mvc" and select the F# C# MVC 4 project template (see below):&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2011/12/VSG_MVC4.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" class="aligncenter size-medium wp-image-107" height="169" src="http://freshbrewedcode.com/danmohl/files/2011/12/VSG_MVC4-300x169.png" title="FsMVC_4 " width="300" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The solution that was used to build this template can be found at &lt;a href="https://github.com/dmohl/FsCsMvc4Template"&gt;https://github.com/dmohl/FsCsMvc4Template&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-3726823759522866256?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/3726823759522866256/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2011/12/building-aspnet-mvc-4-solution-with-f.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/3726823759522866256?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/3726823759522866256?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/283pJiIldPo/building-aspnet-mvc-4-solution-with-f.html" title="Building an ASP.NET MVC 4 Solution with F# and C#" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2011/12/building-aspnet-mvc-4-solution-with-f.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4HR3oyfyp7ImA9WhRRFkQ.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-4460077902908184928</id><published>2011-11-29T18:48:00.001-08:00</published><updated>2011-11-30T16:05:36.497-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-30T16:05:36.497-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="CoffeeScript" /><category scheme="http://www.blogger.com/atom/ns#" term="QUnit" /><category scheme="http://www.blogger.com/atom/ns#" term="Pavlov" /><title>Getting Setup for JavaScript Testing with Pavlov</title><content type="html">I've talked about testing CoffeeScript with Pavlov &lt;a href="http://bloggemdano.blogspot.com/2011/09/unit-testing-jquery-plugin-with.html"&gt;in a previous post&lt;/a&gt;. Today, I'm going to talk about a couple of ways to quickly get started with &lt;a href="https://github.com/mmonteleone/pavlov"&gt;Pavlov&lt;/a&gt;--a BDD API that sits on top of QUnit--in an ASP.NET web app.&lt;br /&gt;
&lt;br /&gt;
In the past, whenever I wanted to start creating Pavlov specs, I would go out to the &lt;a href="https://github.com/mmonteleone/pavlov"&gt;Pavlov GitHub site&lt;/a&gt;, grab the appropriate files, and add them to my web app. While this process isn't all that time consuming, there is now a better way. Now I can simply install the &lt;a href="http://nuget.org/List/Packages/Pavlov"&gt;Pavlov NuGet package&lt;/a&gt; using the &lt;a href="http://nuget.org/"&gt;NuGet Visual Studio Extension&lt;/a&gt;. This package adds a folder named Specs under the Scripts folder that includes a barebones html file and pavlov.js.&lt;br /&gt;
&lt;br /&gt;
An example of what the file structure looks like after this package is installed is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2011/11/Pavlov.NuGet_.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" class="aligncenter size-full wp-image-59" height="204" src="http://freshbrewedcode.com/danmohl/files/2011/11/Pavlov.NuGet_.png" title="Pavlov.NuGet" width="256" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
If I prefer to have a simple example to start with, I can alternatively install the &lt;a href="http://nuget.org/List/Packages/Pavlov.Sample"&gt;Pavlov.Sample package&lt;/a&gt;. This adds the same files as the Pavlov package, but also includes an example.specs.js file with the code from&amp;nbsp;the &lt;a href="https://github.com/mmonteleone/pavlov/blob/master/example/example.specs.js"&gt;example on the Pavlov GitHub site&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Lastly, I've been writing a fair amount of CoffeeScript lately, so I may prefer to have the sample specs written in CoffeeScript. All that is needed for this is to make sure that &lt;a href="http://visualstudiogallery.msdn.microsoft.com/2b96d16a-c986-4501-8f97-8008f9db141a"&gt;Mindscape Web WorkBench Visual Studio Extension&lt;/a&gt;&amp;nbsp;is installed&amp;nbsp;(this is a onetime install) and then install the &lt;a href="http://nuget.org/List/Packages/Pavlov.Coffee"&gt;Pavlov.Coffee NuGet package&lt;/a&gt;. The files are then added to the project including a example.specs.coffee file that looks like this:&lt;br/&gt;&lt;br /&gt;
&lt;script src="https://gist.github.com/1407758.js?file=pavlovNuGutEx.coffee"&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-4460077902908184928?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/4460077902908184928/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2011/11/getting-setup-for-javascript-testing.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/4460077902908184928?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/4460077902908184928?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/yE3I01kZ3m0/getting-setup-for-javascript-testing.html" title="Getting Setup for JavaScript Testing with Pavlov" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2011/11/getting-setup-for-javascript-testing.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8CSX84eCp7ImA9WhRREkk.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-4855981171252495872</id><published>2011-11-24T18:44:00.001-08:00</published><updated>2011-11-25T09:57:48.130-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-25T09:57:48.130-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WPF" /><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio 11" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET MVC" /><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone 7" /><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight" /><category scheme="http://www.blogger.com/atom/ns#" term="Project Templates" /><title>Building F# Solutions in Visual Studio 11</title><content type="html">I love to learn about new technology, seek to continually improve, and always look for ways to make things easier. I then do all that I can to share the knowledge, code, and/or tools that help to achieve these goals. With these goals in mind, I've joined with several friends in the creation of a new blogging community named &lt;a href="http://www.freshbrewedcode.com/"&gt;Fresh Brewed Code&lt;/a&gt;. I'd strongly recommend keeping a close eye on the other Fresh Brewed Coders, as they will be producing some awesome content. You can see the announcement at&amp;nbsp;&lt;a href="http://freshbrewedcode.com/blog/2011/11/23/welcome-to-fresh-brewed-code/"&gt;http://freshbrewedcode.com/blog/2011/11/23/welcome-to-fresh-brewed-code/&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
One of the other ways that I have attempted to achieve the goals mentioned above is through the creation of a number of Visual Studio project and item templates. Over the last several days, there have been updates to almost all of these templates. In this post I'll describe the changes that have been made--most of which have been implemented to allow support for the Developer Preview of Visual Studio 11 and F# 3.0.&lt;br /&gt;
&lt;br /&gt;
I'm sure that you have used Visual Studio Gallery by now, but just in case you haven't yet had the chance, see&amp;nbsp;&lt;a href="http://bloggemdano.blogspot.com/2010/08/f-templates-now-on-visual-studio.html"&gt;http://bloggemdano.blogspot.com/2010/08/f-templates-now-on-visual-studio.html&lt;/a&gt; for how to get started. A screenshot of the Online templates view from the Developer Preview of Visual Studio 11 is shown below:
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;a href="http://freshbrewedcode.com/danmohl/files/2011/11/VS11_VisualStudioGallery.png"&gt;&lt;img alt="" class="aligncenter size-large wp-image-12" height="217" src="http://freshbrewedcode.com/danmohl/files/2011/11/VS11_VisualStudioGallery-1024x443.png" title="Visual Studio 11 Online Project Templates" width="502" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;ASP.NET MVC:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://visualstudiogallery.msdn.microsoft.com/f57aa816-e96b-4133-ab5d-9b9b99914ead"&gt;F# and C# ASP.NET MVC3&lt;/a&gt;&amp;nbsp;-&amp;nbsp;This project template generates the standard ASP.NET MVC 3 template output with separate projects for the view (ASPX in a C# project) and controllers/models (in a F# project). The latest release (version 1.3)&amp;nbsp;adds support for Visual Studio 11 and F# 3.0. You will need to install the ASP.NET MVC 3 Tools Update (see &lt;a href="http://www.asp.net/mvc/mvc3"&gt;http://www.asp.net/mvc/mvc3&lt;/a&gt;&amp;nbsp;and make sure to download/install the correct version for Visual Studio 10 or Visual Studio 11) to use this template.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://visualstudiogallery.msdn.microsoft.com/4fa9f910-f24e-4f99-873b-7fe56e26b054"&gt;F# C# MVC 3&amp;nbsp;&lt;/a&gt;&amp;nbsp;-&amp;nbsp;This is a dynamic project template that generates an empty ASP.NET MVC 3 solution with separate projects for view (C# - either ASPX or Razor), core (F#), and an optional F# project for unit tests. The template is based on the MSDN Magazine article entitled "Authoring an F#/C# VSIX Project Template" which can be found at&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/magazine/hh456399.aspx"&gt;http://msdn.microsoft.com/en-us/magazine/hh456399.aspx&lt;/a&gt;.&amp;nbsp;You will need to install the ASP.NET MVC 3 Tools Update (see&amp;nbsp;&lt;a href="http://www.asp.net/mvc/mvc3"&gt;http://www.asp.net/mvc/mvc3&lt;/a&gt;&amp;nbsp;and make sure to download/install the correct version for Visual Studio 10 or Visual Studio 11) to use this template. Version 1.1 adds support for Visual Studio 11 and F# 3.0.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;WPF:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://visualstudiogallery.msdn.microsoft.com/ad49fd5c-930c-4fe6-a30e-2d0d6778c565"&gt;F# Windows App (WPF, MVVM)&lt;/a&gt; - This project template generates a F# WPF solution with logical separation between View, ViewModel, Model, and Repository. The latest release (version 1.8) resolves a few bugs and adds support for Visual Studio 11 and F# 3.0.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://visualstudiogallery.msdn.microsoft.com/37e2558c-b6df-401a-9a2e-b14c714c4d22"&gt;F# and C# Windows App (WPF, MVVM)&lt;/a&gt; -&amp;nbsp;This is a project template that generates a WPF solution with separation between View (C#), ViewModel (F#), Model (F#), and Repository (F#).&amp;nbsp;The latest release (version 1.7) resolves a few bugs and adds support for Visual Studio 11 and F# 3.0.

&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Web Service:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://visualstudiogallery.msdn.microsoft.com/279345a4-f189-4d1f-98fe-6b1af322d164"&gt;F# and C# Web Service (ASP.NET, WSDL)&lt;/a&gt; -&amp;nbsp;This is a project template that generates a Web Service (WSDL) solution with separate projects for web (C#), services (F#), and contracts (F#). The underlying technology is Windows Communication Foundation. Version 1.5 adds support for Visual Studio 11 and F# 3.0.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Silverlight:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://visualstudiogallery.msdn.microsoft.com/64f3d710-04c1-42d2-9e5d-4e20a19a7666"&gt;F# C# Web App (Silverlight)&lt;/a&gt; -&amp;nbsp;This project template generates a Silverlight solution with separate projects for View (C#) and Core (F#). &amp;nbsp;The Core project includes logical separation between ViewModel, Model, and RemoteFacade. You should install the &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=18149"&gt;Silverlight 4 developer tools&lt;/a&gt;&amp;nbsp;and/or the&amp;nbsp;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=27220"&gt;Silverlight 5 developer tools&lt;/a&gt;&amp;nbsp;plus the&amp;nbsp;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=11100"&gt;April 2011 F# CTP&lt;/a&gt;.&amp;nbsp;Version 1.2 adds support for Visual Studio 11 and includes a template wizard dialog that allows selection of Silverlight version 4 or 5. The determination of whether to display the wizard dialog is triggered off of the installed F# Silverlight client version. It will only display if both 4 and 5 are installed. Note: There are not yet F# 3.0 Silverlight DLLs. Because of this, the current version only support F# 2.0.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://visualstudiogallery.msdn.microsoft.com/f0e9a557-3fd6-41d9-8518-c1735b382c73"&gt;F# Web Application (Silverlight)&lt;/a&gt; -&amp;nbsp;This F# project template generates a Silverlight project with logical separation between View, ViewModel, Model, and RemoteFacade. You should install the&amp;nbsp;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=18149"&gt;Silverlight 4 developer tools&lt;/a&gt;&amp;nbsp;and/or the&amp;nbsp;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=27220"&gt;Silverlight 5 developer tools&lt;/a&gt;&amp;nbsp;plus the&amp;nbsp;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=11100"&gt;April 2011 F# CTP&lt;/a&gt;.&amp;nbsp;Version 1.4 adds support for Visual Studio 11 and includes a dialog that allows selection of the desired Silverlight Version 4 or 5 (depending on installations). Note: There are not yet F# 3.0 Silverlight DLLs. Because of this, the current version only support F# 2.0.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://visualstudiogallery.msdn.microsoft.com/5932f48f-72fd-4cb2-86a1-83487147ab98"&gt;F# Empty Web Application (Silverlight)&lt;/a&gt; - This project template is similar to the F# Web Application (Silverlight) template; however, it does not include all of the example code.&amp;nbsp;You should install the&amp;nbsp;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=18149"&gt;Silverlight 4 developer tools&lt;/a&gt;&amp;nbsp;and/or the&amp;nbsp;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=27220"&gt;Silverlight 5 developer tools&lt;/a&gt;&amp;nbsp;plus the&amp;nbsp;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=11100"&gt;April 2011 F# CTP&lt;/a&gt;.&amp;nbsp;Version 1.1 adds support for Visual Studio 11, removes the C# host application, adds support to generate an HTML test file, and provides functionality to select the desired Silverlight version 4 or 5 (depending on the installation). Note: There are not yet F# 3.0 Silverlight DLLs. Because of this, the current version only support F# 2.0.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://visualstudiogallery.msdn.microsoft.com/2a19db5a-3c3b-4184-b8e8-84993b0939a2"&gt;F# 2.0 Silverlight Library (for Visual Studio 11)&lt;/a&gt; - This is a project template that generates a F# 2.0 Silverlight project. It targets Visual Studio 11 only and will only be needed temporarily. You can read more about this template at&amp;nbsp;&lt;a href="http://bloggemdano.blogspot.com/2011/11/f-silverlight-library-template-in.html"&gt;http://bloggemdano.blogspot.com/2011/11/f-silverlight-library-template-in.html&lt;/a&gt;.&amp;nbsp;Note: There are not yet F# 3.0 Silverlight DLLs. Because of this, the current version only support F# 2.0.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;XAML Item Templates:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://visualstudiogallery.msdn.microsoft.com/06c6ece1-2084-4083-a0f7-934fce9d22fb"&gt;F# XAML Item Templates&lt;/a&gt; - This Visual Studio Extension provides a number of item templates that make working with F# XAML based projects (i.e. the WPF, Silverlight, and/or Windows Phone 7 project templates) much easier. Without these item templates adding new XAML files to one of these projects is a bit of a pain. You have to create a text or xml file, change the extension to .xaml, manually add the default XAML code, and change the Build Action for the .xaml file to Resource. Version 1.1&amp;nbsp;adds item templates for Windows Phone 7 (I'll talk more about this in a future post) and adds support for Visual Studio 11.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;strong&gt;Project Templates That Do Not Currently Support Visual Studio 11:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Since the Developer Preview of Visual Studio 11 does not currently support Windows Phone 7 development, the Windows Phone 7 templates (i.e.&amp;nbsp;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/ed6f38a8-c986-4d26-8846-988d49c8a26a"&gt;C# WP7 with Caliburn.Micro&lt;/a&gt;, &lt;a href="http://visualstudiogallery.msdn.microsoft.com/17454c58-c1d9-4640-afe1-7943db13891e"&gt;F# and C# Win Phone App (Silverlight)&lt;/a&gt;, &lt;a href="http://visualstudiogallery.msdn.microsoft.com/52928c6e-f77f-4ebd-a2f9-9815111bfa33"&gt;F# and C# Win Phone List App (Silverlight)&lt;/a&gt;, and &lt;a href="http://visualstudiogallery.msdn.microsoft.com/1e70ea3a-c564-4199-8915-b651a0035bbe"&gt;F# and C# Win Phone Panorama&lt;/a&gt;) have not yet been updated to support Visual Studio 11. This will be added as soon as a release of Visual Studio 11 is provided that does include this support.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://visualstudiogallery.msdn.microsoft.com/c36619e5-0d4a-4067-8ced-decd18e834c9"&gt;F# and C# Web App (ASP.NET, MVC 2)&lt;/a&gt;&amp;nbsp;- There is not currently an ASP.NET MVC 2 install for Visual Studio 11 and I don't anticipate one to ever be provided. Because of this, I have not (and do not intend to) add support for Visual Studio 11 to this project template.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-4855981171252495872?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/4855981171252495872/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2011/11/building-f-solutions-in-visual-studio.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/4855981171252495872?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/4855981171252495872?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/i7Usnq3cVTE/building-f-solutions-in-visual-studio.html" title="Building F# Solutions in Visual Studio 11" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2011/11/building-f-solutions-in-visual-studio.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0ANQ3s_fip7ImA9WhRSFE0.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-6957342215037845858</id><published>2011-11-15T10:00:00.001-08:00</published><updated>2011-11-15T18:16:32.546-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-15T18:16:32.546-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="CoffeeScript" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><title>A Pinch of CoffeeScript Sugar - Part 1</title><content type="html">In this series, I plan to point out and provide a few examples of some cool&amp;nbsp;syntactic&amp;nbsp;sugar provided by CoffeeScript.&amp;nbsp;In this post, I'll talk about destructuring assignment and splats.&lt;br /&gt;
&lt;br /&gt;
I've shown how to write a jQuery plugin in CoffeeScript in a&lt;a href="http://bloggemdano.blogspot.com/2011/09/unit-testing-jquery-plugin-with.html"&gt; previous post&lt;/a&gt;. In the following example, I take that simple jQuery plugin and add a little more sugar.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1367682.js?file=CoffeeScriptDestructExample.coffee"&gt;
&lt;/script&gt;
The above example is based on the recommendations defined in the&amp;nbsp;&lt;a href="http://docs.jquery.com/Plugins/Authoring"&gt;jQuery&amp;nbsp;Plugins/Authoring documentation&lt;/a&gt;. There are a couple of interesting aspects of this code.&lt;br /&gt;
&lt;br /&gt;
Line 10 (i.e. &lt;b&gt;[_, args...] = arguments&lt;/b&gt;) is using two cool CoffeeScript features. The first is something called destructuring assignment. This feature allows you to take data from arrays or objects and place that data into something more wieldy. In this case, we are taking the &lt;a href="https://developer.mozilla.org/en/JavaScript/Reference/Functions_and_function_scope/arguments"&gt;JavaScript arguments object&lt;/a&gt;, destructuring it, and assigning all of the arguments except the first one to an array named args. This eliminates the need for me to type &lt;b&gt;Array.prototype.slice.call(arguments, 1)&lt;/b&gt;. If I had not used a splat (i.e ...), this would have assigned only the second argument to args. Note: Destructuring assignment has been added to &lt;a href="https://developer.mozilla.org/en/New_in_JavaScript_1.7"&gt;JavaScript 1.7&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The second thing of interest on this line (which I've already briefly mentioned) is the use of the splat. The splat allows you to easily work with anything that involves a variable number of arguments. Since line 10 potentially involves more than 2 passed arguments, this is a perfect place to use a splat. As I mentioned before, the use of the splat in this case will generate JavaScript to slice the arguments array i.e.&amp;nbsp;&lt;b&gt;Array.prototype.slice.call(arguments, 1)&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Lines 11 and 13 also use a splat, but the reasoning behind its use on these lines is slightly different. While this is still related to a varying number of arguments, it has to do with the passing of those arguments to a function rather than retrieval of the additional argument values. The splat in this case will generate JavaScript that uses the Function.apply method.&lt;br /&gt;
&lt;br /&gt;
A little bit of sugar can make things much sweeter (ug...that was bad). I hope you find this post helpful and that you find lots of uses for the described features.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-6957342215037845858?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/6957342215037845858/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2011/11/pinch-of-coffeescript-sugar-part-1.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/6957342215037845858?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/6957342215037845858?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/aMzAZgLli6Q/pinch-of-coffeescript-sugar-part-1.html" title="A Pinch of CoffeeScript Sugar - Part 1" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2011/11/pinch-of-coffeescript-sugar-part-1.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYEQX44eip7ImA9WhRSEko.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-3170633636777785748</id><published>2011-11-12T09:57:00.001-08:00</published><updated>2011-11-14T05:08:20.032-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-14T05:08:20.032-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight" /><category scheme="http://www.blogger.com/atom/ns#" term="Project Templates" /><category scheme="http://www.blogger.com/atom/ns#" term="VS2011" /><title>F# Silverlight Library Template in Visual Studio 11</title><content type="html">If you have played with Visual Studio 11 much, you may have noticed that there isn't a F# Silverlight Library template out-of-the-box. This is presumably due to the fact that the current release of Visual Studio 11 is just a developer preview and there doesn't appear to be a version of F# 3.0 for Silverlight just yet. However, this doesn't stop you from creating Silverlight projects that target F# 2.0 in Visual Studio 11. In order to help you do this, I've created a project template that allows you to create a F# 2.0 Silverlight Library in Visual Studio 11. You can download the VSIX from &lt;a href="http://visualstudiogallery.msdn.microsoft.com/2a19db5a-3c3b-4184-b8e8-84993b0939a2?SRC=Home"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: Verdana; font-size: 13px;"&gt;
The following&amp;nbsp;prerequisites exist for using this library:&lt;/div&gt;
&lt;div style="font-family: Verdana; font-size: 13px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: Verdana; font-size: 13px;"&gt;
1. Download and install&amp;nbsp;the VS2011 Preview with F# 3.0 (see&amp;nbsp;&lt;a href="http://blogs.msdn.com/b/fsharpteam/archive/2011/09/14/f-3-0-developer-preview-now-available.aspx" style="color: #0d76c2; text-decoration: none;"&gt;http://blogs.msdn.com/b/fsharpteam/archive/2011/09/14/f-3-0-developer-preview-now-available.aspx&lt;/a&gt;&amp;nbsp;for more information).&lt;/div&gt;
&lt;div style="font-family: Verdana; font-size: 13px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: Verdana; font-size: 13px;"&gt;
2. Download and install the Microsoft F#, April 2011 CTP from&amp;nbsp;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=11100" style="color: #0d76c2; text-decoration: none;"&gt;http://www.microsoft.com/download/en/details.aspx?id=11100&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-3170633636777785748?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/3170633636777785748/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2011/11/f-silverlight-library-template-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/3170633636777785748?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/3170633636777785748?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/YQyqT9D182Q/f-silverlight-library-template-in.html" title="F# Silverlight Library Template in Visual Studio 11" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2011/11/f-silverlight-library-template-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQHRHsyfyp7ImA9WhRTGEo.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-3048283084383203676</id><published>2011-11-09T14:05:00.000-08:00</published><updated>2011-11-09T14:05:35.597-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-09T14:05:35.597-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone 7" /><category scheme="http://www.blogger.com/atom/ns#" term="Project Templates" /><title>New F# Windows Phone Library Project Template</title><content type="html">There is a new &lt;a href="http://visualstudiogallery.msdn.microsoft.com/092d3f67-c938-4e53-ba1f-3baf6a15aa89?SRC=Home"&gt;F# Windows Phone Library project template now available on Visual Studio Gallery&lt;/a&gt;. This project template allows you to add a new F# library project to a Windows Phone solution rather than having to start with one of the solution templates that is initialized with both a C# and F# project.&lt;br /&gt;
&lt;br /&gt;
As an example, you could easily build the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/17454c58-c1d9-4640-afe1-7943db13891e"&gt;F# and C# Win Phone App (Silverlight)&lt;/a&gt;&amp;nbsp;solution by doing the following:&lt;br /&gt;
&lt;br /&gt;
1. Create a new C# Windows Phone Application (Silverlight).&lt;br /&gt;
2. Add a new F# Windows Phone Library project to the solution.&lt;br /&gt;
3. Add a new XML file to the F# project named MainPage.xaml.&lt;br /&gt;
4. Add content to the MainPage.xaml file as shown &lt;a href="https://github.com/dmohl/FSharpWP7BasicTemplate/blob/master/App/MainPage.xaml"&gt;here&lt;/a&gt;&amp;nbsp;(also change the Build Action option to Resource and the Copy to Output Directory option to Copy always).&lt;br /&gt;
5. Add the code from &lt;a href="https://github.com/dmohl/FSharpWP7BasicTemplate/blob/master/App/AppLogic.fs"&gt;here&lt;/a&gt;&amp;nbsp;to the File1.fs file.&lt;br /&gt;
6. Delete the MainPage.xaml and associated code-behind file from the C# project.&lt;br /&gt;
7. Change the App.xaml.cs code in the C# project to what is shown &lt;a href="https://github.com/dmohl/FSharpWP7BasicTemplate/blob/master/AppHost/App.xaml.cs"&gt;here&lt;/a&gt;&amp;nbsp;(Note: You'll likely need to change the namespace).&lt;br /&gt;
8. Change the App.xaml code in the C# project to what is shown &lt;a href="https://github.com/dmohl/FSharpWP7BasicTemplate/blob/master/AppHost/App.xaml"&gt;here&lt;/a&gt;&amp;nbsp;(Note: You'll likely need to change the namespace).&lt;br /&gt;
9. Edit the properties of the C# project and change the Startup object drop down to the *.AppHost object.&lt;br /&gt;
10. Edit the&amp;nbsp;WMAppManifest.xml file and change:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="p1"&gt;
&amp;lt;&lt;span class="s1"&gt;DefaultTask&lt;/span&gt;&amp;nbsp; &lt;span class="s2"&gt;Name&lt;/span&gt; =&lt;span class="s3"&gt;"&lt;/span&gt;_default&lt;span class="s3"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;NavigationPage&lt;/span&gt;=&lt;span class="s3"&gt;"&lt;/span&gt;MainPage.xaml&lt;span class="s3"&gt;"&lt;/span&gt;/&amp;gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
to&amp;nbsp;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;/div&gt;
&lt;div class="p1"&gt;
&amp;lt;&lt;span class="s1"&gt;DefaultTask&lt;/span&gt;&amp;nbsp; &lt;span class="s2"&gt;Name&lt;/span&gt; =&lt;span class="s3"&gt;"&lt;/span&gt;_default&lt;span class="s3"&gt;"&lt;/span&gt;/&amp;gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
11. Finally, add a reference to the F# project, build, and test.&lt;/div&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-3048283084383203676?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/3048283084383203676/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2011/11/new-f-windows-phone-library-project.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/3048283084383203676?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/3048283084383203676?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/ckRdwjFyCi8/new-f-windows-phone-library-project.html" title="New F# Windows Phone Library Project Template" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2011/11/new-f-windows-phone-library-project.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EHSXcycSp7ImA9WhRTFko.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-2943590748213950462</id><published>2011-11-07T05:13:00.000-08:00</published><updated>2011-11-07T05:13:58.999-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-07T05:13:58.999-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="CoffeeScript" /><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><category scheme="http://www.blogger.com/atom/ns#" term="Node.js" /><title>A Coder Interview with Dan Mohl</title><content type="html">&lt;a href="http://www.codeproject.com/KB/interviews/Interview-Dan-Mohl.aspx"&gt;A Coder Interview With Dan Mohl&lt;/a&gt; by Terrence Dorsey (&lt;a href="http://www.twitter.com/tpdorsey"&gt;@tpdorsey&lt;/a&gt;) was recently published in the &lt;a href="http://www.codeproject.com/KB/interviews/"&gt;articles section of The Code Project site&lt;/a&gt;. In it, I talk about tools, technology, and frameworks that interest me (F#, CoffeeScript, Node.js, etc.), my background, how the community has influenced my coding, and much more.&lt;br /&gt;
&lt;br /&gt;
You can find the article at&amp;nbsp;&lt;a href="http://www.codeproject.com/KB/interviews/Interview-Dan-Mohl.aspx"&gt;http://www.codeproject.com/KB/interviews/Interview-Dan-Mohl.aspx&lt;/a&gt;.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-2943590748213950462?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/2943590748213950462/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2011/11/coder-interview-with-dan-mohl.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/2943590748213950462?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/2943590748213950462?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/abStnIiENHI/coder-interview-with-dan-mohl.html" title="A Coder Interview with Dan Mohl" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2011/11/coder-interview-with-dan-mohl.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMGR384cCp7ImA9WhRTEEs.&quot;"><id>tag:blogger.com,1999:blog-4853877730213459430.post-8862797810363452468</id><published>2011-10-30T18:56:00.000-07:00</published><updated>2011-10-31T05:17:06.138-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-31T05:17:06.138-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Metro" /><category scheme="http://www.blogger.com/atom/ns#" term="fsharp" /><category scheme="http://www.blogger.com/atom/ns#" term="F#" /><category scheme="http://www.blogger.com/atom/ns#" term="Windows 8" /><category scheme="http://www.blogger.com/atom/ns#" term="VS2011" /><title>Calling F# Libraries from Metro Style Apps</title><content type="html">This weekend, I finally got around to trying to build a polyglot Metro style app (C# front-end + F# back-end). This post will talk about the project file changes that were required and the one outstanding issue that I'm still working. Additionally, a VSIX package is provided that provides the F# Metro Library project template as it exists today.&lt;br /&gt;
&lt;br /&gt;
Note: This approach has only been tested with the simplest of examples.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Getting Setup:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
1. In order to create a Metro style app, you need to install&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/windows/apps/br229516"&gt;Windows 8 Developer Preview with Developer Tools&lt;/a&gt;.&lt;br /&gt;
2. To also have F#, you'll then need to install &lt;a href="http://msdn.microsoft.com/en-us/vstudio/hh127353"&gt;Visual Studio 11 Developer Preview&lt;/a&gt;.&lt;br /&gt;
3. Now create a new C# Windows Metro style application (I chose the Application template).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Adding F#:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If you have installed the VSIX that is linked at the bottom of this post, you can simply add the F# Metro Library, write some code, wire it up, and test. If not, you'll need to add a standard F# Library project and modify the project file.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Modifying the F# Project File:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
To allow a F# Library project to be called from a Metro app., the project file must be modified so that it imports the Microsoft.Windows.UI.Xaml.Common.targets. While this small adjustment allows the project to be interacted with, the reference shown in the Metro style project will provide a warning indicating that something isn't quite copacetic. This warning can be eliminated by adding the following elements to the property group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TargetFrameworkIdentifier&amp;gt;.NETCore&amp;lt;/TargetFrameworkIdentifier&amp;gt;&amp;lt;TargetFrameworkVersion&amp;gt;v4.5&amp;lt;/TargetFrameworkVersion&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unfortunately, adding these elements causes some sort of conflict with the F# targets, which I am still working to resolve. &lt;strike&gt;I have not yet run into an issue (other than the unsightly warning display) that is caused by leaving out these two elements, so for the moment only the common Xaml targets import has been added.&lt;/strike&gt;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Conclusion:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
While there is still a lot of work to do, adding the import of the common Xaml targets to the F# project file will allow you to start using F# projects from Metro style apps (Note: In simple cases only--for now). &amp;nbsp;Once the remaining issues are identified and resolved, I'll add the F# Metro Library VSIX to Visual Studio Gallery. Until then, you can find the F# Metro Library VSIX (with the known issues) &lt;a href="https://sites.google.com/site/danodocs/Home/FsMetroLibrary.vsix"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4853877730213459430-8862797810363452468?l=bloggemdano.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://bloggemdano.blogspot.com/feeds/8862797810363452468/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://bloggemdano.blogspot.com/2011/10/calling-f-libraries-from-metro-style.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/8862797810363452468?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4853877730213459430/posts/default/8862797810363452468?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BloggemDano/~3/DPOiX4uMQb8/calling-f-libraries-from-metro-style.html" title="Calling F# Libraries from Metro Style Apps" /><author><name>Daniel Mohl</name><uri>http://www.blogger.com/profile/17462870714458080019</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="18" src="http://1.bp.blogspot.com/_HK2nW1E0B3s/SO875zZECAI/AAAAAAAAAAM/A8QGI_N1ev8/S220/danProfile.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://bloggemdano.blogspot.com/2011/10/calling-f-libraries-from-metro-style.html</feedburner:origLink></entry></feed>

