[Dependency] Attribute sometimes fails

Feb 18, 2009 at 10:49 AM

I'm developing an application on .NET 2.0 using VS2008. I'm also using Unity, and in a couple of places [Dependency]. Normal constructor injection seems fine...

When I test the app on a test XP box with .NET2.0 (Original) the code fails when it tries to inject objects marked with [Dependency].

What can be the problem?

Feb 18, 2009 at 9:14 PM
Right now, the problem is that your post consists of "it doesn't work." We need a lot more information.

Like, what does "fail" mean? Does it not inject values at all? Throw an exception? Do some of the properties get injected or none of them? Do you have a stack trace?

Do the objects in question work at all without the container under .NET 2.0? Is there a difference in security configuration between the two machines?

Can you provide a small program that reproduces the problem?

I'm happy to help, but you've got to give me something to work with. The Microsoft psychic debugging implants aren't due to be released to employees for at least another couple of years.