Instructions & Downloads for Caliburn Micro 1.1 RTW .net 3.5 WPF Compilation
Update: Caliburn.Micro 1.1 has been released (RTW) and if you are living in .net framework 3.5 Sp1 land these instructions show how to compile Caliburn.Micro 1.1 RTW against the .Net framework 3.5 SP1 runtime.
Instructions how to compile Caliburn.Micro 1.1 for .net framework 3.5 and WPF
- First things first – you can skip these instructions and simply download Caliburn.Micro 1.1 RTW .net 3.5 assemblies.
- Otherwise to get started download the Caliburn.Micro .net 4.0 source.
- Copy the visual studio 2010 solution files into a working directory

- Open the solution file (ignore projects not loading message).

- Generally the windows phone 7 project will not load
(unless you have WP7 SDK)
- Remove the WP7 & Silverlight Projects from the solution

(don’t delete the Silverlight files as they are referenced by WPF) - Change the project to target the .net 3.5 runtime .
(client profile is optional depending on your needs) - Remove the existing reference to System.Windows.Interactivity and System.Xaml

- Download System.Windows.Interactivity assembly dll for .net 3.5 from one of the following sources:
- Add a reference to System.Windows.Interactivity.dll assembly.
- Download System.CoreEx assembly dll for .net 3.5 from one of the following sources:
- Add a reference to the System.CoreEx.dll assembly.
- Compiling the solution will throw an error:
Invalid variance: The type parameter 'T' must be invariantly valid on 'Caliburn.Micro.IParent<T>.GetChildren()'. 'T' is covariant.- To correct this error change line 26 of IConductor.cs to remove the ‘out’ modifier

- The updated code will look as follows:

- Compiling will throw another error:
type or namespace name 'DatePicker' could not be found- There are two options to correct this:
- Add a reference to the WPF Toolkit.
- Remove the conditional from line 182 of ConventionManager.cs

- Compiling will throw one final error: ActionMessage.cs
'System.Array' does not contain a definition for 'Zip'...- The following code will fix the error and get Caliburn.Micro 1.1 to compile under .Net 3.5
- You can download the EnumerableExtension.cs source file or copy the code below.
-
static class EnumerableExtension
{
public static IEnumerable<TResult> Zip<T1, T2, TResult>(this
IEnumerable<T1> source1, IEnumerable<T2> source2, Func<T1, T2,
TResult> func)
{
using (var iter1 = source1.GetEnumerator())
using (var iter2 = source2.GetEnumerator())
{
while (iter1.MoveNext() && iter2.MoveNext())
{
yield return func(iter1.Current, iter2.Current);
}
}
}
}
If all was followed correctly you will have a copy of the Caliburn.Micro 1.1 RTW source code building against the .net framework 3.5. If you have any questions please comment and I will replay asap. Of course you can always download the compiled Caliburn.Micro 3.5 assemblies directly.

Leave a reply to Caliburn Micro v1.1 .net 3.5 WPF Framework Build Download Instructions