SharpCrafters Forum – Nant task

SharpCrafters Support Forum

        


Nant task Expand / Collapse
Author
Message
Posted 12/8/2009 4:08:01 AM


Community Member
Hello,
I have downloaded PostSharp 1.5 and found among files PostSharp.NAntTasks.dll Unforunately, I could not find a good blog/tutorial to show how to use it. Could you please point me to one?

Thank you,
Sean
Post #3211
Posted 12/8/2009 7:31:16 AM


Gael Fraiteur

SharpCrafters
I think you could find some sample by looking in Build\Common.include.
Or, in PostSharp 2.0, it may be easier, in Samples\*.include.

-g
Post #3212
Posted 12/16/2009 7:55:03 PM


Community Member
Thank you for reply.
I am using 1.5 and cannot find that folder anywhere in PostSharp 1.5 installation directory. I did found some build files, but the include info about folders that are missing... could you look into this and confirm?
Thanks.
Post #3213
Posted 12/17/2009 7:07:22 AM


Gael Fraiteur

SharpCrafters
Yes, maybe samples are not ready for nant in 1.5.
You can look in Build\Common.include (in the source distribution) to see how it's used, but this file is more complex because it contains stuff to build PostSharp itself.
Post #3214
Posted 12/17/2009 2:56:09 PM


Community Member
Gael,
Thank you. The script was in the source distribution of 1.5
This is what I think looks like what I need:

<postsharp input="[color=#0000BF]${intermediateDir}/${projectName}.${extension}[/color]"
             project="[color=#BF0000]${postsharpDir}/Default.psproj[/color]"
             parameters="Output=="[color=#0000BF]${outputDir}/${projectName}.${extension};="[/color]
                 ReferenceDirectory=.;     Configuration=${configuration};
    Platform=Any;
   SearchPath=${intermediateDir},${postsharpSearchPath};    IntermediateDirectory=${intermediateDir}/postsharp;
   CleanIntermediate=false;
                 SignAssembly=false;
                 PrivateKeyLocation=;
                 ResolvedReferences=;"/>

The question now what is the project (marked with red)? input and output are ok (executable or library project we are operating on). I was looking around for .psproj and couldn't find it.
On top of that, in my case the project (DLL) has a reference to PostShart.Public and Laos directly. I am normally executing NAnt msbuild task on a solution level, so I am not sure how the sample above would work.
Appreciate your help.

Sean
Post #3215
Posted 12/17/2009 3:03:56 PM


Gael Fraiteur

SharpCrafters
Input and output are correct.

But I don't understand. If you build the solution using MSBuild, and PostSharp is included in the MSBuild project (csproj), i.e. the PostSharp.targets are imported, then you don't need to call the PostSharp nant task.
Post #3216
Posted 12/17/2009 3:18:05 PM


Community Member
You are right about the msbuild task option.
The issue is that it takes long time on a bigger project to test/compile. Idea was to leverage PostSharp NAnat task when we compile for deployment only. This is why I am trying to figure out PostSharp NAnt task.
Would be great if you could put together a sample or a blog post. I am sure there are quite a few people looking for this <!-- s:) --> <!-- s:) -->
Thank you in advance.
Post #3217
Posted 12/21/2009 3:16:02 PM


Gael Fraiteur

SharpCrafters
Btw, the latest build supports XBuild in Mono 2.6. Use PostSharp.XBuild.targets.
Post #3218
« Prev Topic | Next Topic »


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

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.118. 8 queries. Compression Disabled.