Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Global.asax.vb (66)#0: Reference required to assembly 'SimpleInjector, Version=1.5.0.12199, Culture=
adamhall
#1 Posted : Tuesday, October 16, 2012 1:24:56 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/16/2012(UTC)
Posts: 3
Location: United Kingdom

Hi

We recently had a rather large checkin committed by another developer in our web client who doesn't yet use NCrunch. As a result, everybody's solution is reporting this in the NCrunch build process:

Quote:
Reference required to assembly 'SimpleInjector, Version=1.5.0.12199, Culture=neutral, PublicKeyToken=984cb50dea722e99' containing the type 'SimpleInjector.Container'. Add one to your project.


The line is as follows:

GlobalConfiguration.Configuration.DependencyResolver = New SimpleInjectorWebApiDependencyResolver(container)

Strangely the DLL does exist for the solution, I can see it in bin\SimpleInjector.dll

If I ignore the solution everything works fine, but I feel like i'm hiding the problem to a later date.

NOTE: my \AppData\Local\NCrunch\1140\34\_ncrunchreferences\ folder DOES contain references to the important DLLs.

System.Web.Http.dll
SimpleInjector.dll

any further ways I can debug this?
Remco
#2 Posted : Tuesday, October 16, 2012 7:58:55 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi, thanks for posting!

IOC containers and IL injectors/weavers often make use of custom assembly resolution logic, which sometimes conflicts with NCrunch's build integration.

Although I'm not sure exactly how this injector component works, my first suggestion would be to try turning on the 'Copy referenced assemblies to workspace' setting for the projects in your solution, to see if this makes a difference. Generally this setting is not recommended because it can degrade build performance, although unfortunately some frameworks do rely on referenced assemblies being adjacent to build output files when code is being executed.

Let me know if this does the trick. If so, I'll help you delve a bit deeper to see if we can come up with a solution that doesn't involve this setting.


Cheers,

Remco
adamhall
#3 Posted : Wednesday, October 17, 2012 12:35:17 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/16/2012(UTC)
Posts: 3
Location: United Kingdom

Sorry - I have already tried that.

Bizarrely, I have setup a new project to isolate the issue, and I could not recreate it, until I copied my Web.Config file across and suddley I get the error message. I'll post it to bitbucket for you. Do you have a bitbucket account?

adamhall
#4 Posted : Wednesday, October 17, 2012 12:41:18 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/16/2012(UTC)
Posts: 3
Location: United Kingdom

Oh man even weirder - I can remove some blank spaces from the web config and it builds okay, put them back in and it dies. Could this just be something to do with the files being built asynchronously and a race condition kills the dll being copied?
Remco
#5 Posted : Wednesday, October 17, 2012 6:06:53 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
This sounds like an intermittent problem. If you can send the project through to my using the contact webform, I'll take a look at it for you.


Thanks!

Remco
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.038 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download