I have a project which references a postsharp 4.1.14. When I build a project the error occurred. Postsharp is installed by nuget package. There is .net version 4.0 installed on computer, but Microsoft.Build.Utilities.ToolLocationHelper.GetPlatformSDKLocation method is from .net 4.5. Can I use different version of postsharp? Is there another way to fix my problem?
Error 1 The "PostSharp30GetInstalledFrameworks" task failed unexpectedly.
System.MissingMethodException: Method not found: 'System.String Microsoft.Build.Utilities.ToolLocationHelper.GetPlatformSDKLocation(System.String, System.Version)'.
at PostSharp.MSBuild.PostSharp30GetInstalledFrameworks.b__5(<>f__AnonymousType02 <>h__TransparentIdentifier0)
at System.Linq.Enumerable.<>c__DisplayClass12
3.b__11(TSource x)
at System.Linq.Enumerable.<>c__DisplayClass123.<CombineSelectors>b__11(TSource x)
at System.Linq.Enumerable.<>c__DisplayClass12
3.b__11(TSource x)
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.MoveNext()
at System.Xml.Linq.XContainer.AddContentSkipNotify(Object content)
at PostSharp.MSBuild.PostSharp30GetInstalledFrameworks.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult) ConsoleApplication1