Postsharp4Entlib - PostSharp.Laos DLL

Topics: User Discussion
Oct 30, 2007 at 2:48 PM
I'm having some trouble to get postsharp4entlib running. I keep on getting "Could not load file or assembly 'PostSharp.Laos, Version=, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7' or one of its dependencies. The system cannot find the file specified." while I referenced the dll.

I've got the current version of postsharp installed, which is

I'm trying to call this very simple method:

class MyService
public void SayHello()

Here is the reference section from my .csproj file:

<Reference Include="EntLibContrib.PostSharp4EntLib, Version=, Culture=neutral, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Practices.EnterpriseLibrary.Logging, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Practices.EnterpriseLibrary.PolicyInjection, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Practices.EnterpriseLibrary.PolicyInjection.CallHandlers, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="PostSharp.Laos, Version=, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7, processorArchitecture=MSIL" />
<Reference Include="PostSharp.Public, Version=, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />

Any ideas what's going wrong?


Oct 30, 2007 at 3:59 PM
It's most probably because one of the assemblies still references the old version.
Try to rebuild all projects.
Oct 30, 2007 at 4:46 PM
Thanks for the quick reply Gael,

I was using the binary release from entlib contrib. I've downloaded the EntLib Contrib source and rebuild the PostSharp4Entlib project. I'm using this self compiled EntLibContrib.PostSharp4EntLib dll in my project now and it works fine.

When I switch back to the EntLibContrib.PostSharp4EntLib dll that shipped with the binary release I run into the same problem again. So apparently "EntLibContrib.PostSharp4EntLib" is referencing the old version and can't work with newer versions of PostSharp.Laos?

Thanks for your help,