I keep getting an error when trying to use Prism4 Bootstrapper with Unity referenced by source (include existing projects into the solution). I also get an error building Unity from source and then including the output files.
Here's the details:
I've got a project using Prism4. The Bootstrapper component for Prism relies on Unity 2.0. To me more precise they rely on Version 2.0.414.0 of unity.
If I try to include the current or a newer version of Prism into My project as prism 4, then VS gives me a message to generate some app.config code that forces the loading of the newest assembly.
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Practices.Unity" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.1.505.0" newVersion="2.1.505.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
When using the prebuilt dll files for Unity 2.0 and Unity 2.1, this works without a problem...
However, if I try to build these from source and use the new DLLs, or include the projects directly into my project I always get the error:
The type 'Microsoft.Practices.Unity.IUnityContainer' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Practices.Unity, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Mind you that Unity 2.0 [b]IS[/b] version 2.0.414.0. So my very first attempt was by using the unity 2.0 source base. I have also made many subsequent attempts using this version, including starting from a fresh project. I've tried including Prism by pre-built bin files, source, and custom built dlls with the same result. I've also tried all of the same things using Unity 2.1 in hopes it might work.
My environment is MSVC# 2010 win7 x64. I've built under x86 and Any CPU configurations as well as both debug and release. The only dependencies are Prism and Unity.