|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
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.
|
|
|
|
|
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.
|
|
|
|
|
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
|
|
|
|
|
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.
|
|
|
|
|
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.
|
|
|
|
|
Gael Fraiteur
SharpCrafters
|
|
|
Btw, the latest build supports XBuild in Mono 2.6. Use PostSharp.XBuild.targets.
|
|
|
|