SharpCrafters Forum – Unable to build postsharped project (for .NET3.5) in VS2010

SharpCrafters Support Forum

        


Unable to build postsharped project (for... Expand / Collapse
Author
Message
Posted 5/28/2009 11:21:56 PM


Sergei Dorogin

Community Member
I known, PS doesn't support .NET 4.0, but I'm trying to build a project which targets .net 3.5 under VS2010.
Here's ouput log:

Error 89 Unhandled exception: PostSharp.CodeModel.BindingException: Cannot find the type 'System.IEquatable`1, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in assembly 'mscorlib, 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.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.InvokeProjects(ProjectInvocation[] projectInvocations)
  at PostSharp.MSBuild.PostSharpRemoteTask.Execute(PostSharpTaskParameters parameters, TaskLoggingHelper log) Xtensive.Core

Does any workaround exist?
Post #3074
Posted 5/29/2009 7:25:47 AM


Gael Fraiteur

SharpCrafters
I think the problem is that VS2010 hosts the CLR 4, and PostSharp needs to be hosted in the same CLR as the transformed application.

I suggest you run the command line utility. You can do this by adding the following to your project or to PostSharp-1.5.targets:


<PropertyGroup>
<PostSharpUseCommandLine>True</<PostSharpUseCommandLine>>
</PropertyGroup>
Post #3075
Posted 6/4/2009 4:31:26 AM


Sergei Dorogin

Community Member
It works! Thanks.
Post #3076
Posted 12/29/2009 11:52:07 PM


Community Member
Note:  You need to restart Visual Studio after making this change.
Post #3077
« Prev Topic | Next Topic »


All times are GMT +1:00, Time now is 11:31am

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.025. 15 queries. Compression Disabled.