Hello,

 

Good catch.

 

Client profile is on its way out, though, and I'm not sure that it contains
the transactions namespace either? I guess one would have to compile for
.Net4 client and explicitly throw exceptions if using it - but I've had
problems like you're describing with other projects too.

 

Henrik 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Alik Kurdyukov
Sent: den 21 november 2012 19:51
To: [email protected]
Subject: Re: Announcing Castle.{Transactions, Facilities.AutoTx} v3.1

 

Hi,

 

I've found a problem and the problem was in my way of adding dependencies
with NuGet. The console project I created was destined for Net4 Client
Profile. I added some dependencies (using client profile), than found that
it does not work and changed to Net4 Full. Bus some dependencies were not
changed - that lead to missing method.

 

This problem is pretty hard to find. I think that if Castle had
PerWebRequest in client profile build that throws exception with description
like 'PerWebRequest is not available in client profile build' the problems
like mine can be solved pretty fast. What do you think?

 

Best regards,

Alik.


On Wednesday, November 21, 2012 4:16:29 PM UTC+4, Alik Kurdyukov wrote:

Hi Hernik and Stu,

 

I've got same "Method not found:
'Castle.MicroKernel.Registration.ComponentRegistration`1<!0>
Castle.MicroKernel.Registration.Lifestyle.LifestyleGroup`1.get_PerWebRequest
()'" problem in by test project. You can check the project itself at
https://github.com/akurdyukov/SimpleToDo

 

Full stacktrace is

System.MissingMethodException was unhandled

  Message=Method not found:
'Castle.MicroKernel.Registration.ComponentRegistration`1<!0>
Castle.MicroKernel.Registration.Lifestyle.LifestyleGroup`1.get_PerWebRequest
()'.

  Source=Castle.Facilities.NHibernate

  StackTrace:

       at
Castle.Facilities.NHibernate.NHibernateFacility.GetLifeStyle[T](ComponentReg
istration`1 registration, UInt32 index, String baseName)

       at
Castle.Facilities.NHibernate.NHibernateFacility.RegisterSession(Data x,
UInt32 index) in
C:\Users\alik\Development\projects\EmerginMarket\Castle.Facilities.NHibernat
e\NHibernateFacility.cs:line 257

       at Castle.Facilities.NHibernate.NHibernateFacility.<Init>b__7(Data x)
in
C:\Users\alik\Development\projects\EmerginMarket\Castle.Facilities.NHibernat
e\NHibernateFacility.cs:line 202

       at
Castle.Transactions.Helpers.EnumerableExtensions.<Do>d__0`1.MoveNext() in
d:\BuildAgent-03\work\9844bdf039249947\src\Castle.Transactions\Helpers\Enume
rableExtensions.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() in
C:\Users\alik\Development\projects\EmerginMarket\Castle.Facilities.NHibernat
e\NHibernateFacility.cs:line 186

       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
SimpleToDo.LocalBootstrapper.ConfigureApplicationContainer(IWindsorContainer
container) in
C:\Users\alik\Development\projects\SimpleToDo\SimpleToDo\LocalBootstrapper.c
s:line 30

       at Nancy.Bootstrapper.NancyBootstrapperBase`1.Initialise()

       at Nancy.Hosting.Self.NancyHost..ctor(INancyBootstrapper
bootstrapper, Uri[] baseUris)

       at Nancy.Hosting.Self.NancyHost..ctor(Uri[] baseUris)

       at SimpleToDo.Program.Main(String[] args) in
C:\Users\alik\Development\projects\SimpleToDo\SimpleToDo\Program.cs:line 39

       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly,
String[] args)

       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)

       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state, Boolean
ignoreSyncCtx)

       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)

       at System.Threading.ThreadHelper.ThreadStart()

  InnerException: 

 

I included binary version for Castle.Facilities.NHibernate because it
supports using HNibernate.Mapping.Attributes (see my pull request
https://github.com/haf/Castle.Facilities.NHibernate/pull/9).

 

I have no idea why system cannot find that method. Can you please take a
look and tell me what can I do about it?

 

Best regards,

Alik.

-- 
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/-/-9wcFGvRx2EJ.
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.

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
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.

Reply via email to