views:

11

answers:

1

Hi,

I'm getting a strange error when trying to compile a solution that is using StructureMap on Team Build.

When I try to compile the solution locally on Visual Studio it works fine, but when trying to queue a new build in Team Build I get the following error:

Overload resolution failed because no accessible 'Use' can be called with these arguments:

The line of code that gets this error is the second one:

ForSingletonOf(Of ISessionFactory)().Use(NHibernateSessionFactory.SessionFactory)
Me.For(Of ISession)().lifecycleIs(New HybridLifecycle()).Use(Function(x) x.GetInstance(Of ISessionFactory)().OpenSession())

It's a standard registration for the NHibernate session, so I don't really get why this error pops up.

Thanks in advance for the clues.

A: 

Make sure you have the correct version of NHibernate on the build server, and that your hint paths are all appropriately set in your project file. We haven't had this specific issue (as we're not using NHibernate), but we've had weird issues like that being related to version mismatches of "infrastructure" DLLs between local and build.

Robaticus
I've checked and I definitively have the same version of the dll. Actually I put all the external dlls in a folder on TFS itself, so that all machines are always up to date with the dll versions.
Gimly
For any DLLs that are not GACced, make sure the hintpaths in the CSPROJ are relative paths. We ran into trouble with this. If that's not the problem, I'm probably at the limit of my suggestions (sorry).
Robaticus