PostSharp causes error with .Net 4.0 when building
Posted
by Kev Hunter
on Stack Overflow
See other posts from Stack Overflow
or by Kev Hunter
Published on 2010-05-07T08:10:15Z
Indexed on
2010/05/12
21:54 UTC
Read the original article
Hit count: 1729
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?
© Stack Overflow or respective owner