Castle Windsor 3 Beta 1 - ArrayResolver Dependencies Not Injected?
Nov 18, 2011
I'm having an issue with Castle Windsor 3 Beta 1. I'm using the ArrayResolver which has been added to the installer like so:objContainer.Kernel.Resolver.AddSubResolver(New ArrayResolver(objContainer.Kernel, True))
From there I am registering a component and trying to inject an array of IWorkers. The IWorkers have their own dependencies. In the case where only one IWorker is specified, its dependencies are resolved- but when multiple are passed in this does not happen.
This won't work:objContainer.Register(Component.For(Of Services.INotifiableService).ImplementedBy(Of Services.MyService).Named(GetType(Services.MyService).Name).DependsOn(Dependency.OnComponent(GetType(Services.Resolvers.IResolver), GetType(Services.Resolvers.MyResolver).Name), Dependency.OnComponentCollection(Of Services.Workers.IWorker())(GetType(Services.Workers.IWorkerImplementationA),
I'm currently using the log4net portion of the Castle Windsor logging facility, like so:
objContainer.AddFacility("logging", New LoggingFacility(LoggerImplementation.Log4net)WithConfig("ConfigsLog4net.config"))
I need to pass in a couple of variables to the logger because I am using dynamic log file names. I have looked at the source code and determined that one possible course of action is to create a custom factory and facility but this is alot of work and I'm not sure it is best practice.
I have save the file in beta 1 and when i upgrade to beta 2?Error 1 Type 'System.Windows.Forms.WindowsFormsApplicationBase' is not defined. Error 2 'AuthenticationMode' is not a member of 'Forms'. Error 3'ShutdownMode' is not a member of 'Forms'.Option Strict On[cod]e...
I got some spare time, and want to use it to expand my knowledge. I remember Dll injection as a thing I always wanted to try, so I started there. I have successfully (it says) injected the dll(I made in vs2010 vb.net) into my exe - also made in vs2010 vb.net. But nothing happens. I think I need to call it somehow, but I have not managed to find a good site to explain me this, so I need to ask here:)I have tried to make a function in the dll with a msgbox saying "hi", but nothing shows up. So I try to make the main exe say "hi" like this:Removed and the injected dll is coded like this:Removed but it doesn't seem to overwrite it.
My code is:Removed only slightly edited version of this.how I should call my injected dll?
I'm trying to implement the Bouncy Castle encryption library in a .Net project, but am not finding a lot of .Net-related documentation. The class/method structure isn't even close to the ample Java-related examples.
When user inserts a duplicate entry in a unique field, Castle ActiveRecord throws the following exception: Castle.ActiveRecord.Framework.ActiveRecordException was unhandled Message="Could not perform Save for SerieNotaFiscal" Source="Castle.ActiveRecord" StackTrace: [Code] .....
Env X is working on a calculator that needs some help to make it better.We have a button that will make the number either positive or negative.We have code that works but we want to make it better.Env X will give you the piece of code and see what you can do with it.[code]
P2 has got a base class X that was inherited in an other class Y in P2. So, we add the ref P1 to P2. However, P3 uses P2.Y and doesn't use P1.X directly.
To do this we have to add ref P2 to P3. But there is a difference between VB and C#.
In VB, we add ref P2 only to P3. P2 uses P1 but it doesn't matters for P3. We don't need to add ref P1 to P3. This is enough!
But, in C#, we have to add ref P1 and P2 both to P3 even if the P3 doesn't use P1.X . If you don't add ref A to C you get the error below:
The type 'P1.X' is defined in an assembly that is not referenced. You must add a reference to assembly 'P1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
This is my first vb.net project and I am curious how am I suppose to know what dependencies will be required by the client. I had them download the .NET framework and that didn't seem to help. How do I know if I need something extra?
I've tried to install the Visual Studio 2010 VB Express - but no luck. Can't uninstall the beta 2 version I have. I've tried to uninstall each component in control panel but continue to get windows installer errors - or error 1719. how to delete the beta version? Tried deleting the .net framework 4 keys in registry, no luck.
Im trying to make a web browser in VB 2010 well i tried the simpleWebBrowser1.Navigate(ToolStripTextBox1.Text)For the search button but it doesent go anywhere but the name of that form in a random search engine everytime how would i code this with Back Forward and refresh button als
What's the best way to store that the app is beta?You can't enter letters in the assembly info version (a "b" would be great).So is a setting who is set to Beta = True the best? I don't want to hardcode it, I want it to be at one place in the program.
I'm trying to read all dependencies of one dll file in a known path. To do this I'm using reflection as this code shows:
For Each AsmName As AssemblyName In asm.GetReferencedAssemblies() Try Log += AsmName.Name & " : " &
[Code].....
All files that starts by IM2_ are the files what i want to get the path.
I've observed that the files wich can't find has PublicKeyToken=null. I've googled by this and it's because I didn't serializaed the classes when were compiled.
The target is get all filepath of all dependencies of a dll file.
I have never used VB compiler or a Visual Studio before;I have been trying to download Visual Studio Beta 2 from this site. I am confused! There are 3 downloads; guide says download as per requirements; after downloading the first one I tried to run it but I think it asked for the 3rd one in a disk! Do I have to download all 3?
Here is a link to a FREE Beta version of a .Net decompiler.Some of you may find this useful? >>[URL}..If you do try it within the next 5 or so hours while I sleep, you may want to leave feedback of your experience(s) here in this thread.I have merely posted the above link in case any of you want to try a decompiler.
I have a simple application that stores settings using My.Settings. When built using .Net 4.0, it works fine. If I change to build with .Net 3.5 Client (or just .Net 3.5) I get an error 'An error occurred creating the configuration section handler for userSettings/My_Application.My.MySettings: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089''.
How can I build an application for PC's that do not have .Net 4.0.
In ASP.Net Web Forms there are cases that I've come across that create order dependent code. As an obvious code smell I'm looking for solutions to solve this problem.
A pseudo-code example would be: Calling Code :: Page.aspx
protected void Page_Load(...) { var control = LoadControl("ControlX.ascx"); // Ugly since the control's constructor is not used by LoadControl control.SetDependencies(...);
[Code]...
LoadControl has two signatures, the one used above accepts a string for the control classes physical location and correctly creates the child controls. Whereas the second signature accepts the control class as a class type, and any parameters for the constructor, however the child controls are not created as detailed in TRULY Understanding Dynamic Controls.
So how can I eliminate this order dependency in the cleanest way? My first thought is that if I dynamically created the child controls in ControlX, but then that can be cumbersome for larger controls.
I recently added hsProgressbar.dll to my Program, it worked fine, but then I decided to remove it from my Computer and also remove it from the references...however..the Warning is still there? How can I completely remove it, so that I don't get the error anymore?
I've tried using the VS 2010 beta to edit some real projects, and it is next to unusable due to performance issues. The cpu is more or less constantly at 100%, and most often the code editor uses around 10 seconds to respond to any text input. If I introduce a couple of compile errors things get even worse. Are there some drastical performance improvements that are planned in the VB editor before release, or are there special things that might trigger this?
VS 2010 Beta 1 offers the user the opportunity to change .NET versions.I compiled a solution then built same in .NET 4.0 Then compiled/(re)built in 3.5. The output info showed 3.5 but on an XP Pro (up to date .NET 3.5 machine) the Setup install produces an error message:"You need to obtain NET 4.0. Do you wish to get it now?"
I've been having a problem since installing the first beta of Visual Studio 2010 which has limited what i have been able to do. The problem centres around one reference: System.Design When I attempt to add the reference i get the following error: However, the System.Design.dll file actually does exist and is valid:
Would like to use the Spell Check Class which I read is in the System.Windows.Controls namespace. However if I add to my class "Inherits System.Windows.Controls it is not accepted. I am using VB 2010 Express and VB.Net 4.0.21006 B2Rel.