Attempting to compile a model written in the Delphi Prism language fails in Visual Studio 2010 with the following error:

Error   1   (PS0099) Unhandled exception (2.0.8.1271, 64 bit, CLR 4.0, Release):
PostSharp.Sdk.CodeModel.BindingException: 
    Error while loading the type "Xtensive.Core.Weaver.PlugIn, Xtensive.Core.Weaver": 
    Could not load type 'PostSharp.AspectWeaver.PlugIn' from assembly
   'PostSharp.Sdk, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7'.
===== Start of PostSharp Assembly Binder ===========================
...

Since it seems to be a configuration issue with PostSharp when using something other than C# or VB.NET, I was curious if this did not have an obvious solution.

Incidentally I find Delphi Prism's "built in" language support for AOP to be quite compelling (see this page). No, I don't expect you to dump PostSharp and re-implement DO.NET in Delphi Prism.

I'd be happy just to be able to use F# and/or Delphi Prism in VS.NET with DO.NET... ;)

asked Aug 26 '10 at 10:41

BobCalco's gravatar image

BobCalco
101225

edited Aug 26 '10 at 13:56

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

Hmm, have you tried to enable Fusion log and see what's wrong with assembly loading?

(Aug 26 '10 at 14:04) Alex Yakunin Alex%20Yakunin's gravatar image

I have not actually. Will do, thanks for the idea.

(Aug 29 '10 at 06:08) BobCalco BobCalco's gravatar image

One Answer:

PostSharp currently doesn't officially support Delphi - that's the main reason.

For now we aren't ready to dedicate some forces on reproduction of this issue. But we're ready to help you to enable it for Delphi by advices -- i.e. we're ready to answer on any precise question like this.

answered Aug 26 '10 at 14:08

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

edited Aug 26 '10 at 14:09

I would like to understand how PostSharp "injects" itself into targets, that might help me figure out what changes need to be made to make it work. I may have the same problem with F# targets as well once I get past the "dual interface implementation" problem with the next build of DO.NET, so understanding this is probably useful for all language targets not (yet) officially supported by PostSharp.

(Aug 29 '10 at 06:16) BobCalco BobCalco's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA