Error while trying to compile Log4PostSharpDemo

Support of Log4PostSharp

Error while trying to compile Log4PostSharpDemo

Postby sharpmao on Fri Jul 04, 2008 2:25 pm

Hello,

I just discovered PostSharp and Log4PostSharp. It seems very interesting, but I can't compile the demo project, getting this message :

error: Unhandled exception: Cannot find the type 'PostSharp.Extensibility.MulticastAttribute, PostSharp.Public, Version=1.0.9.372, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7' in assembly 'PostSharp.Public, Version=1.0.10.385, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7'. See below for details.
PostSharp.CodeModel.BindingException: Cannot find the type 'PostSharp.Extensibility.MulticastAttribute, PostSharp.Public, Version=1.0.9.372, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7' in assembly 'PostSharp.Public, Version=1.0.10.385, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7'.
at PostSharp.CodeModel.AssemblyEnvelope.GetTypeDefinition(String typeName, BindingOptions bindingOptions)
at PostSharp.CodeModel.TypeRefDeclaration.GetTypeDefinition()
at PostSharp.Extensibility.Tasks.TypeHierarchyTask.IndexType(TypeDefDeclaration type)
at PostSharp.Extensibility.Tasks.CustomAttributeDictionaryTask.InternalAddAttribute(ICustomAttributeInstance attribute)
at PostSharp.Extensibility.Tasks.CustomAttributeDictionaryTask.Execute()
at PostSharp.Extensibility.Project.ExecutePhase(String phase)
at PostSharp.Extensibility.Project.Execute()
at PostSharp.Extensibility.PostSharpObject.ExecuteProjects()
at PostSharp.Extensibility.PostSharpObject.InvokeProjects(ProjectInvocation[] projectInvocations)
at PostSharp.Console.Program.InternalMain(String[] args)
C:\Program Files\PostSharp 1.0\PostSharp-1.0.targets(255,5): error : The PostSharp build step failed (exit code 12). See previous errors or the build log for details.
Done building project "Log4PostSharpDemo.csproj" -- FAILED.


Can you help me ?

Thanks a lot for your work,

Sharpmao
sharpmao
 
Posts: 2
Joined: Fri Jul 04, 2008 2:21 pm
First Name: Alain
Last Name: Grenier

Re: Error while trying to compile Log4PostSharpDemo

Postby gfraiteur on Fri Jul 04, 2008 4:06 pm

I would guess it's a matter of version. You should set the references to PostSharp as "Specific Version = False".
Gael Fraiteur, project leader
gfraiteur
Site Admin
 
Posts: 834
Joined: Tue Dec 18, 2007 3:09 pm
First Name: Gael
Last Name: Fraiteur
Company: postsharp.org

Re: Error while trying to compile Log4PostSharpDemo

Postby sharpmao on Fri Jul 04, 2008 4:16 pm

Found it,

It was a question of version, but not where I thought of it first.
Log4PostSharp source code has a "Libraries" Directory with an old version of PostSharp.Public.dll.
I just deleted it, recompiled, and it works.

Thanks,

Sharpmao
sharpmao
 
Posts: 2
Joined: Fri Jul 04, 2008 2:21 pm
First Name: Alain
Last Name: Grenier


Return to Log4PostSharp