1
votes

I'm trying to add the Latest Twitter module to an Orchard application (hosted on Azure), however I'm getting the following error after registering it:

Could not load file or assembly 'NHibernate.Linq, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

If I unregister the Twitter module, the error doesn't occur, and I can't see any references to NHibernate.Linq in the module. The error is occurring in the DefaultContentQuery class.

Any idea what's going on?

UPDATE

Ahh, think I've found out. The module was referencing Orchard.Core and Orchard.Framework from within its own bin folder, so I changed it to reference the source projects. Presumably it was compiled with an older version.

1
Thanks for this. Couldn't figure it out . . . This worked!ericb

1 Answers

0
votes

In my case it was a bug (in referencing) within the CyberStride.Contacts and Mello.ImageGallery modules. They were referencing the Orchard dll's directly than the csproj files.

Quickly detected based off a simple grep command like ...

find . -iname "*.csproj" | xargs grep -i "orchard*.dll"

Wrong example:

<HintPath>..\..\bin\Orchard.Core.dll</HintPath>

Right example:

<ProjectReference Include="..\..\Core\Orchard.Core.csproj">