Hi Henrik,
I have just uninstalled all of the Castle packages from my project, deleted
the app.config file and deleted the folders from the packages folder. I
then installed the Castle.Facilities.NHibernateFacility package which
installed all of the dependent packages such as Castle.Core,
Castle.Facilities.AutoTx, etc. After cleaning the solution and building it,
I was left with the following error:
Assembly 'Castle.Facilities.NHibernate, Version=0.7.1.23602,
Culture=neutral, PublicKeyToken=407dd0808d44fbdc' uses
'Castle.Transactions, Version=3.2.207.2207, Culture=neutral,
PublicKeyToken=407dd0808d44fbdc' which has a higher version than referenced
assembly 'Castle.Transactions, Version=3.1.206.2206, Culture=neutral,
PublicKeyToken=407dd0808d44fbdc'
which I fixed by updating all of the Castle packages to the latest versions
(when NuGet installed them as dependent packages it must not have chosen
the latest version). So now I don't get any compilation errors but I am
still getting the exception from my previous post. This is my app.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Castle.Windsor"
publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0"
/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Castle.Transactions"
publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.2.207.2207"
newVersion="3.2.207.2207" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Castle.Core"
publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0"
/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Castle.Facilities.AutoTx"
publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.206.2206"
newVersion="3.1.206.2206" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Castle.Facilities.FactorySupport"
publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"
/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
This is a list of all of the references to DLLs in my solution (AsmSpy from
here<http://mikehadlow.blogspot.co.uk/2011/02/asmspy-little-tool-to-help-fix-assembly.html>is
a wonderful tool):
Reference: mscorlib
4.0.0.0 by Castle.Core
4.0.0.0 by Castle.Facilities.AutoTx
4.0.0.0 by Castle.Facilities.FactorySupport
4.0.0.0 by Castle.Facilities.NHibernate
4.0.0.0 by Castle.Transactions
4.0.0.0 by Castle.Windsor
2.0.0.0 by FluentNHibernate
4.0.0.0 by GalaSoft.MvvmLight.Extras.WPF4
4.0.0.0 by GalaSoft.MvvmLight.WPF4
2.0.0.0 by Iesi.Collections
2.0.0.0 by Microsoft.Practices.ServiceLocation
2.0.0.0 by NHibernate
4.0.0.0 by NLog
4.0.0.0 by System.Windows.Interactivity
4.0.0.0 by DontForgetThePresents
2.0.0.0 by DontForgetThePresents
4.0.0.0 by vshost32
2.0.0.0 by vshost32
Reference: System.Xml
4.0.0.0 by Castle.Core
4.0.0.0 by Castle.Transactions
4.0.0.0 by Castle.Windsor
2.0.0.0 by FluentNHibernate
2.0.0.0 by NHibernate
4.0.0.0 by NLog
Reference: System
4.0.0.0 by Castle.Core
4.0.0.0 by Castle.Facilities.AutoTx
4.0.0.0 by Castle.Facilities.FactorySupport
4.0.0.0 by Castle.Transactions
4.0.0.0 by Castle.Windsor
2.0.0.0 by FluentNHibernate
4.0.0.0 by GalaSoft.MvvmLight.Extras.WPF4
4.0.0.0 by GalaSoft.MvvmLight.WPF4
2.0.0.0 by Iesi.Collections
2.0.0.0 by Microsoft.Practices.ServiceLocation
2.0.0.0 by NHibernate
4.0.0.0 by NLog
4.0.0.0 by System.Windows.Interactivity
4.0.0.0 by DontForgetThePresents
Reference: System.Core
4.0.0.0 by Castle.Core
4.0.0.0 by Castle.Facilities.AutoTx
4.0.0.0 by Castle.Facilities.NHibernate
4.0.0.0 by Castle.Transactions
4.0.0.0 by Castle.Windsor
3.5.0.0 by FluentNHibernate
4.0.0.0 by GalaSoft.MvvmLight.Extras.WPF4
4.0.0.0 by GalaSoft.MvvmLight.WPF4
3.5.0.0 by NHibernate
4.0.0.0 by NLog
4.0.0.0 by System.Windows.Interactivity
4.0.0.0 by DontForgetThePresents
3.5.0.0 by DontForgetThePresents
Reference: System.Configuration
4.0.0.0 by Castle.Core
4.0.0.0 by Castle.Windsor
2.0.0.0 by FluentNHibernate
2.0.0.0 by NHibernate
4.0.0.0 by NLog
Reference: Castle.Windsor
3.1.0.0 by Castle.Facilities.AutoTx
3.1.0.0 by Castle.Facilities.FactorySupport
3.1.0.0 by Castle.Facilities.NHibernate
3.1.0.0 by DontForgetThePresents
Reference: Castle.Core
3.1.0.0 by Castle.Facilities.AutoTx
3.1.0.0 by Castle.Facilities.FactorySupport
3.1.0.0 by Castle.Facilities.NHibernate
3.1.0.0 by Castle.Transactions
3.1.0.0 by Castle.Windsor
Reference: Castle.Transactions
3.2.207.2207 by Castle.Facilities.AutoTx
3.2.207.2207 by Castle.Facilities.NHibernate
3.2.207.2207 by DontForgetThePresents
Reference: System.Transactions
4.0.0.0 by Castle.Facilities.AutoTx
4.0.0.0 by Castle.Transactions
2.0.0.0 by FluentNHibernate
2.0.0.0 by NHibernate
Reference: NHibernate
3.3.1.4000 by Castle.Facilities.NHibernate
3.3.1.4000 by FluentNHibernate
3.3.1.4000 by DontForgetThePresents
Reference: FluentNHibernate
1.3.0.733 by Castle.Facilities.NHibernate
1.3.0.733 by DontForgetThePresents
Reference: Castle.Facilities.AutoTx
3.2.207.2207 by Castle.Facilities.NHibernate
3.2.207.2207 by DontForgetThePresents
Reference: Castle.Facilities.FactorySupport
3.1.0.0 by Castle.Facilities.NHibernate
Reference: System.Data
2.0.0.0 by FluentNHibernate
2.0.0.0 by NHibernate
4.0.0.0 by NLog
Reference: Iesi.Collections
1.0.1.0 by FluentNHibernate
1.0.1.0 by NHibernate
Reference: Microsoft.Practices.ServiceLocation
1.0.0.0 by GalaSoft.MvvmLight.Extras.WPF4
Reference: System.Windows.Interactivity
4.0.0.0 by GalaSoft.MvvmLight.Extras.WPF4
Reference: WindowsBase
4.0.0.0 by GalaSoft.MvvmLight.Extras.WPF4
4.0.0.0 by GalaSoft.MvvmLight.WPF4
4.0.0.0 by System.Windows.Interactivity
Reference: PresentationFramework
4.0.0.0 by GalaSoft.MvvmLight.Extras.WPF4
4.0.0.0 by GalaSoft.MvvmLight.WPF4
4.0.0.0 by System.Windows.Interactivity
4.0.0.0 by DontForgetThePresents
Reference: PresentationCore
4.0.0.0 by GalaSoft.MvvmLight.Extras.WPF4
4.0.0.0 by GalaSoft.MvvmLight.WPF4
4.0.0.0 by System.Windows.Interactivity
Reference: System.Xaml
4.0.0.0 by GalaSoft.MvvmLight.Extras.WPF4
4.0.0.0 by System.Windows.Interactivity
4.0.0.0 by DontForgetThePresents
Reference: System.ServiceModel
3.0.0.0 by NHibernate
4.0.0.0 by NLog
Reference: System.Xml.Linq
3.5.0.0 by NHibernate
Reference: System.Windows.Forms
4.0.0.0 by NLog
Reference: System.Drawing
4.0.0.0 by NLog
Reference: System.Runtime.Serialization
4.0.0.0 by NLog
Reference: GalaSoft.MvvmLight.WPF4
4.0.23.37706 by DontForgetThePresents
Reference: Castle.Facilities.NHibernate
0.7.1.23602 by DontForgetThePresents
Reference: Microsoft.VisualStudio.HostingProcess.Utilities.Sync
10.0.0.0 by vshost32
To the untrained eye (mine!), this all looks normal. This is my first
project that I've used NuGet for so I haven't had to dabble with app.config
and dependencies before so I'm a little out of my depth here.
Thanks
Stu
On Monday, September 3, 2012 5:32:38 PM UTC+1, Henrik wrote:
>
> Hello Stu,
>
> The reason you got that popup was that the enumerable extension file is
> what iterates over the configuration, and the call-site was in a captured
> lambda of that loop.
>
> So, greek aside, I think your problem is related to having incompatible
> versions of Windsor in your application. You can see that the tests run
> fine, so there's no rebind-problem in the facility. I think you'll have to
> go through your assemblies and check that you aren't referencing the wrong
> version of Windsor anywhere in there...
>
> Krzysztof - I'm on the right track here, right?
>
> Henrik
>
>
> ----- Ursprungligt meddelande -----
> Från:
> [email protected] <javascript:>
>
> Till:
> <[email protected] <javascript:>>
> Kopia:
> <[email protected] <javascript:>>
> Skickat:
> Sat, 1 Sep 2012 08:12:13 -0700 (PDT)
> Ämne:
> Re: Announcing Castle.{Transactions, Facilities.AutoTx} v3.1
>
>
> Hi Henrik,
>
> I've downloaded the latest version but I'm still having a problem that I
> think *might *be related. When I first built and ran my code after
> updating, an open file dialog appeared asking for the location of an
> EnumerableExtension.cs file. I didn't think much of this at the time as I
> didn't think it was related to the update so I cancelled the dialog. This
> was a few days ago so I'm not sure what exactly happened next as I was in a
> rush but I *think* that my app loaded successfully. However I've come
> back to it today and I'm getting the following exception when loading my
> app:
>
> Method not found:
> 'Castle.MicroKernel.Registration.ComponentRegistration`1<!0>
> Castle.MicroKernel.Registration.Lifestyle.LifestyleGroup`1.get_PerWebRequest()'.
>
> The stacktrace for the exception is:
>
> at
> Castle.Facilities.NHibernate.NHibernateFacility.GetLifeStyle[T](ComponentRegistration`1
>
> registration, UInt32 index, String baseName)
> at Castle.Facilities.NHibernate.NHibernateFacility.RegisterSession(Data
> x, UInt32 index)
> at Castle.Facilities.NHibernate.NHibernateFacility.<Init>b__7(Data x)
> at
> Castle.Transactions.Helpers.EnumerableExtensions.<Do>d__0`1.MoveNext() in
> d:\BuildAgent-03\work\9844bdf039249947\src\Castle.Transactions\Helpers\EnumerableExtensions.cs:line
>
> 48
> at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
> at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
> at Castle.Facilities.NHibernate.NHibernateFacility.Init()
> at
> Castle.MicroKernel.Facilities.AbstractFacility.Castle.MicroKernel.IFacility.Init(IKernel
>
> kernel, IConfiguration facilityConfig)
> at Castle.MicroKernel.DefaultKernel.AddFacility(IFacility facility)
> at Castle.MicroKernel.DefaultKernel.AddFacility[T]()
> at Castle.Windsor.WindsorContainer.AddFacility[T]()
> at ProjectName.Core.ViewModelResolver.configureContainer() in
> E:\Github\ProjectName\ProjectName\ProjectName\Core\WindsorResolver.cs:line
> 41
> at ProjectName.Core.ViewModelResolver.Resolve(String viewModelName) in
> E:\Github\ProjectName\ProjectName\ProjectName\Core\WindsorResolver.cs:line
> 18
> at ProjectName.Core.ViewModelLocator.get_Item(String viewModelName) in
> E:\Github\ProjectName\ProjectName\ProjectName\Core\ViewModelLocator.cs:line
> 18
>
> The code that is causing this exception is:
>
> _container = new WindsorContainer();
>
> _container.AddFacility<AutoTxFacility>();
> _container.Register(
> Component.For<INHibernateInstaller>()
> .ImplementedBy<FluentNHibernateInstaller>());
> _container.AddFacility<NHibernateFacility>();
>
> It could well be that I am doing something wrong as I am new to Castle
> Windsor but it seemed worthy of posting here given that I've just updated
> my packages.
>
> Can you shed any light on the problem?
>
> Thanks
> Stu
>
>
> On Thursday, August 23, 2012 1:18:38 AM UTC+1, Henrik wrote:
>>
>> v3.2 targeting the new Windsor released. They should indeed contain dlls
>> this time. ^^
>>
>> On Thursday, August 23, 2012 12:46:03 AM UTC+2, Henrik wrote:
>>>
>>> Hello,
>>>
>>> Just wanted to check in pretty late and say that I'm working on this
>>> now. There's been a gap in my ability to work on this, as you may have
>>> noticed.
>>>
>>> Regards,
>>> Henrik
>>>
>>> On Saturday, August 11, 2012 4:00:33 PM UTC+2, Stu wrote:
>>>>
>>>> I posted about this on Stack Overflow (see here:
>>>> http://stackoverflow.com/questions/11913331/installing-castle-transactions-from-nuget-doesnt-produce-a-dll
>>>> )
>>>> as this is still a problem. Unfortunately I haven't been able to resolve
>>>> the problem and I think the main reason for that is that Castle has also
>>>> had an update in the past few days. Trying to manually resolve this by
>>>> installing older versions of various packages is a dependency nightmare
>>>> that I haven't beaten.
>>>>
>>>> Does anyone have any idea how to fix this? Is it only Henrik that can
>>>> accept the pull request and deploy to NuGet? I dropped him an email the
>>>> other day to tell him that this was an issue but I haven't had a response
>>>> yet.
>>>>
>>>> Thanks
>>>> Stu
>>>>
>>>> On Wednesday, June 27, 2012 7:47:46 PM UTC+1, Henrik wrote:
>>>>>
>>>>> Castle.Transactions v3.1 and Castle.Facilities.AutoTx v3.1 are now
>>>>> ready for downloading from nuget and source from github, like usual!
>>>>>
>>>>>
>>>>>
>>>>> This is the first GA release of version 3.0. It’s compliant with
>>>>> Windsor 3.0.
>>>>>
>>>>>
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Henrik
>>>>>
>>>>>
>>>>>
>>>> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/castle-project-users/-/11BzIFOEaaoJ.
> To post to this group, send email to
> [email protected]<javascript:>
> .
> To unsubscribe from this group, send email to
> [email protected] <javascript:>.
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/castle-project-users/-/wYUHWiiQRyQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.