FluentNHibernate 1.1 / Castle 1.1 dependency - fluent-nhibernate

I would like to upgrade my FluentNHibernate to version 1.1, but I found out it uses Castle.Core 1.1.
I use Castle.Windsor 1.2 in my app which works with Castle.Core 1.2.
I now need to find a version of Castle.Windsor that uses this earlier version of Castle.Core, but I can't find it anywhere.
What do you recommend I should do?
Wait for a version of FluentNHibernate that uses the latest Castle.Core?
OR build FluentNHibernate 1.1 from source using the latest Castle.Core?
OR downgrade my Castle.Windsor version?

Only NHibernate.ByteCode.Castle.dll and Castle.DynamicProxy2.dll depend on Castle.Core.dll.
You can get them compiled against Castle.Core.dll 1.2 from the Castle ActiveRecord 2.1.1 release.

If you don't want to build FluentNHibernate against the lastest version of Castle, add this to your app.config/web.config file :
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Castle.DynamicProxy2" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="2.1.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="1.1.0.0" newVersion="1.2.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Related

Using 2 versions of log4net in one application

I have a need to reference 2 different versions of log4net in my application.
An older assembly I am referencing uses log4net-net-1.0.dll version 1.2.0.30507,
whereas my newer dependencies use log4net V1.2.15.
I have tried placing this in the web.config to have my application look in a different folder when trying to find the older log4net dll:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="log4net-net-1.0" publicKeyToken="b4df9eabc7e0e71e" />
<codeBase version="1.2.0.30507" href="log4netv1.2.0\log4net-net-1.0.dll" />
</dependentAssembly>
</assemblyBinding>
</runtime>
But the dll is not getting found.
Is there something else I need to do in order for this to work.

Autofac.Extras.DynamicProxy2 With Autofac 3.5.2

I have 2 projects in my solution.
One uses Autofac 3.5.2 and the other is used Autofac.Extras.DynamicProxy2 for interception (Autofac 3.3.1).
The one with Autofac 3.3.1 has project reference to the one with Autofac 3.5.2.
Trying to run different dll versions in my solution fails, while upgrading 3.3.1 to 3.5.2 skips interceptor logic.
I would like to run interception on Autofac 3.5.2 since I use 3.5.2 on many other project I develop.
Did someone faced this issue with success?
Thank you
The error I get is:
Error 5 Assembly ' , Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da' which has a higher version than referenced assembly 'Autofac, Version=3.3.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da'
You have to use assemblyBinding:
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Babaganoush SDK - which version of Sitefinity supported?

Babaganoush SDK - which version of Sitefinity supported?
-- error when used in Sitefinity version - 7.0.5115.0.
Does Babaganoush supports only - 7.0.5100
You need to add an assembly binding for all of the 7.0.5100 assemblies babaganoush is referencing. For example:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Telerik.Sitefinity" publicKeyToken="b28c218413bdf563" />
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.1.5115.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>

general System.Web.Razor error (also Postal project)

VS 2012, MVC4 app using Postal 0.8.0
When I NuGet install Andrew’s Davey’s Postal 0.8.0 it works on my development machine but when I deploy it I get this error message:
Could not load file or assembly 'System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
I have spent several days trying to get this to work. What is the cause of this problem and how do you fix it?
When you install Postal with NuGet it replaces System.Web.Razor 2.0 with System.Web.Razor 1.0. I had to delete the reference to System.Web.Razor 1.0 and then added back in System.Web.Razor 2.0. You have to additionally set Copy Local to True in the Properties for System.Web.Razor and then rebuild the project. Once I did that VS2012 copied the System.Web.Razor.dll to the deployed bin directory and the problem cleared.
Postal also adds these dependency's to the web.config. I removed them and it still works properly.
<dependentAssembly>
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="RazorEngine" publicKeyToken="9ee697374c7e744a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.8.0" newVersion="3.0.8.0" />
</dependentAssembly>
UPDATE 3/3/13
AD has just released Postal v0.8.2 which updated System.Web.Razor to 2.0.
The WebGrease dependency, with the release of ASP.NET and Web Tools 2012.2 (http://www.asp.net/vnext/overview/fall-2012-update) appears to be the default now.

NHibernate 2.1.1 references an older version of Spring

NHibernate 2.1.0 references Spring 1.3.0.
NHibernate 2.1.1 references Spring 0.0.0.2.
Is there any special reason for that? I upgraded to NHibernate 2.1.1 and now I'm getting Assembly loading errors.
NHibernate 2.1.2GA has been released and on the 15th of december the springteam is going to release Spring.Net 1.3GA. I updated to a nightly build (they are pretty stable right now and there is a "feature freeze") and it is already compiled against 2.1.2GA. You might want to try that too.
You need to use an assembly redirect in your app/web.config to point to the version of Spring.NET you want to use. The version numbers will depend on the specific version you're using.
I'm guessing you're going to use the proxies generated by Spring.NET instead of i.e. Castle, you'll need to pick up one of the latest builds since there's a bug in Spring.NET 1.3 and the NHibernate provider.
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Spring.Aop"
publicKeyToken="65e474d141e25e07"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.20110"
newVersion="0.0.0.20310"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Spring.Core"
publicKeyToken="65e474d141e25e07"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.20110"
newVersion="0.0.0.20310"/>
</dependentAssembly>
</assemblyBinding>
</runtime>