Using plugin config files

Do you program directly PostSharp.CodeModel or another low-level API and need help? Put your questions here and we will try to answer.

Using plugin config files

Postby jiridj on Tue May 06, 2008 12:15 pm

It is unclear to me from the Trace sample what exactly is needed for having Core recognize and pick up a psplugin file. I created one for my interceptor and added it to my weaver project, but the build now throws an error:

The plug-in "Interceptor.Messaging" required by the type "[Interceptor.Messaging]Interceptor.Messaging.MessagingTraceAttribute" was not found.

My Interceptor.Messaging.psplugin file is located in the project/namespace Interceptor.Messaging.Weaver and looks as follows:

<?xml version="1.0" encoding="utf-8" ?>
<PlugIn xmlns="http://schemas.postsharp.org/1.0/configuration">
<SearchPath Directory="bin/{$Configuration}"/>
<TaskType Name="Interceptor.Messaging"
Implementation="Interceptor.Messaging.Weaver.MessagingTraceTask, Interceptor.Messaging.Weaver">
<Dependency TaskType="CodeWeaver"/>
</TaskType>
</PlugIn>

Any tips or hints are greatly appreciated! TIA

Jiri
jiridj
 
Posts: 4
Joined: Fri Apr 25, 2008 3:27 pm
Location: Brussels
Full Name: Jiri De Jagere

Re: Using plugin config files

Postby gfraiteur on Wed May 07, 2008 9:51 am

Jiri,

You should make sure that your psplugin is present in the search path of PostSharp.

In documentation, you can find the standard directories present by default in the search path.

In a development environment, the best practice is to include your psplugin in the project outputs (so that it is copied in bin\Debug).

In projects using your plugin, edit project properties, go to the "Reference Path" tab, and add the directory containing your psplugin.

If you have still difficulties, you can enable tracing by editing the file PostSharp-Library.config and running MSBuild with detailed verbosity.

Gael
Gael Fraiteur, project leader
got good support? consider donating to the project.
gfraiteur
Site Admin
 
Posts: 673
Joined: Tue Dec 18, 2007 3:09 pm
Full Name: Gael Fraiteur
Company: postsharp.org

Re: Using plugin config files

Postby jiridj on Wed May 07, 2008 1:43 pm

Great pointer! Got it working now.

Thanks for the help.

Jiri
jiridj
 
Posts: 4
Joined: Fri Apr 25, 2008 3:27 pm
Location: Brussels
Full Name: Jiri De Jagere


Return to PostSharp Core


cron