PostSharp causes error with .Net 4.0 when building
- by Kev Hunter
When trying to build a project which used PostSharp 1.5 on our Ci Server we get the following error;
C:\Program Files\PostSharp 1.5\PostSharp-1.5.targets (261,5):
error: Unhandled exception: PostSharp.CodeModel.BindingException: Cannot find the type 'System.Action`2' in assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
at PostSharp.CodeModel.AssemblyEnvelope.GetTypeDefinition(String typeName, BindingOptions bindingOptions)
at PostSharp.CodeModel.TypeRefDeclaration.GetTypeDefinition(BindingOptions bindingOptions)
at PostSharp.CodeModel.TypeSpecDeclaration.GetTypeDefinition(BindingOptions bindingOptions)
at PostSharp.Extensibility.Tasks.IndexGenericInstancesTask.Execute()
at PostSharp.Extensibility.Project.ExecutePhase(String phase)
at PostSharp.Extensibility.Project.Execute()
at PostSharp.Extensibility.PostSharpObject.ExecuteProjects()
at PostSharp.Extensibility.PostSharpObject.InvokeProject(ProjectInvocation projectInvocation)
at PostSharp.MSBuild.PostSharpRemoteTask.Execute(PostSharpTaskParameters parameters, TaskLoggingHelper log)
It has previously worked on .net 3.5. What's the best way to fix this?