|
|
|
Community Member
|
|
Really like the product, I would consider myself an intermediate C# coder- got it working with visual studio in about 5 mins. Taking the same project and working in mono right now (monodevelop). I’ve been reading through the posts about others trying to get postsharp working with Mono and I think it would be really handy to have all the info available in one place on how to setup. I haven’t been able to get it working yet, if you are willing to answer a few questions to help me setup I’d be happy to write a “how to” with screenshots on using this product with Mono in exchange.
-What version and build of postsharp works with Mono?
-What version of Mono has it been tested against and which runtime (1,2,3.5)?
-I read in a post that if you use XBuild- which I understand Monodevelop does, that you need to modify the project file to include a reference to PostSharp.XBuild.targets. Is that as simple as copying that file out of one of your builds and modifying the file to something like the following:
</ItemGroup> <Import Project ”PostSharp.XBuild.targets" />
What other steps are required, as I’ve done all of these and still haven’t had any luck.
|
|
|
|
|
Gael Fraiteur
SharpCrafters
|
|
Mono is supported as a secundary platform, i.e. it is not supposed to work as smoothly as with Microsoft .NET. You're supposed to spend more time in configuring. Some features are missing: most importantly support for PDBs.
I tested with Mono 2.6.1.0 (Mac OSX) and XBuild, where it's enough to import PostSharp.XBuild.targets into your csproj. There's also an NAnt task, which you may integrate manually in your build scripts.
You should be able to build the sample DotNet35/CSharp/Cache just out of the box with xbuild.
Let me know if you have any specific problem.
Thanks,
-gael
|
|
|
|
|
Community Member
|
|
Hi,
Thanks for the assistance, I tried the cache and sure enough worked right out of the box in mono. I tried the Trace project though and didn’t have any success. I compared the csproj files between trace and cache and I don’t see much different other than:
<Target Name="BeforeBuild">
<Message Text="OS=$(OS)" />
and:
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
But changing this doesn’t make much difference. Any thoughts on how to get the trace example working in mono?
|
|
|
|
|
Gael Fraiteur
SharpCrafters
|
|
I don't know what problem you're experiencing.
When I try building the Trace sample on a Mac OS/X box, I have no problem at all.
|
|
|
|
|
Community Member
|
|
Using Mono with Mono Develop 2.2.1 on windows XP. Tried the 2.0 and 3.5 versions of .net. On the trace project without modifying the code. Doesn't produce anything on the screen.
Build Output
Building: Trace (Debug) Building Solution Trace Building: Trace (Debug) Performing main compilation... C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe /noconfig "/out:C:\Program Files\PostSharp 2.0\Samples\DotNet35\CSharp\Trace\bin\Debug\Trace.exe" "/r:C:\Program Files\PostSharp 2.0\Release\PostSharp.dll" "/r:System.dll" /nologo /warn:4 /debug:+ /debug:full /optimize- "/define:DEBUG;TRACE" /t:exe "C:\Program Files\PostSharp 2.0\Samples\DotNet35\CSharp\Trace\FullTraceAttribute.cs" "C:\Program Files\PostSharp 2.0\Samples\DotNet35\CSharp\Trace\Formatter.cs" "C:\Program Files\PostSharp 2.0\Samples\DotNet35\CSharp\Trace\Program.cs" "C:\Program Files\PostSharp 2.0\Samples\DotNet35\CSharp\Trace\Properties\AssemblyInfo.cs" "C:\Program Files\PostSharp 2.0\Samples\DotNet35\CSharp\Trace\QuickTraceAttribute.cs" /fullpaths
Build complete -- 0 errors, 0 warnings
---------------------- Done ----------------------
Build successful.
Application Output
Application Output
Loaded Module 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'
Started Thread 4832
Loaded Module 'C:\Program Files\PostSharp 2.0\Samples\DotNet35\CSharp\Trace\bin\Debug\Trace.exe'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll'
Started Thread 2564
Toby Lang
IT Application Development
Overwaitea Food Group
E-mail: toby_lang@owfg.com
Phone: 604-881-3957
|
|
|
|
|
Gael Fraiteur
SharpCrafters
|
|
I guess you aren't using XBuild in Mono 2.2 (it does not work well enough).
Then, it does not work out of the box. What are you using? NAnt?
|
|
|
|