<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SharpDevelop on Ash Tewari</title><link>https://www.tewari.info/tag/sharpdevelop/</link><description>Recent content in SharpDevelop on Ash Tewari</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Tue, 29 Apr 2008 05:04:43 +0000</lastBuildDate><atom:link href="https://www.tewari.info/tag/sharpdevelop/feed.xml" rel="self" type="application/rss+xml"/><item><title>PostSharp with SharpDevelop</title><link>https://www.tewari.info/2008/04/28/postsharp-with-sharpdevelop/</link><pubDate>Tue, 29 Apr 2008 05:04:43 +0000</pubDate><guid>https://www.tewari.info/2008/04/28/postsharp-with-sharpdevelop/</guid><description>&lt;p&gt;&lt;a class="link" href="http://sharpdevelop.net/OpenSource/SD/Default.aspx" title="SharpDevelop HomePage"&#10; target="_blank" rel="noopener"&#10; &gt;SharpDevelop3.0&lt;/a&gt; uses &lt;a class="link" href="http://en.wikipedia.org/wiki/MSBuild" title="MSBuild on wikipedia"&#10; target="_blank" rel="noopener"&#10; &gt;MSBuild&lt;/a&gt;. Including PostSharp in your build process is transparent if you are doing a global install using PostSharp installer. If you are doing a per-project installation using &amp;ldquo;Binary - No Installer&amp;rdquo;&lt;a class="link" href="http://www.postsharp.org/download/" title="postsharp download"&#10; target="_blank" rel="noopener"&#10; &gt;download&lt;/a&gt;, you will need to import the PostSharp targets into your .csproj file -&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; True&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;C:\code\PostSharp-1.0.8.316-Binary\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For more details, read the install instructions included in the PostSharp &lt;a class="link" href="http://www.postsharp.org/download/" title="postsharp download"&#10; target="_blank" rel="noopener"&#10; &gt;download&lt;/a&gt; and &lt;a class="link" href="http://www.postsharp.org/blog/2008/01/under-hood-of-msbuild-integration.html" title="under-hood-of-msbuild-integration"&#10; target="_blank" rel="noopener"&#10; &gt;under-the-hood-of-msbuild-integration&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;To use local PostSharp binaries (relative to your project) , modify your .csproj file as follows -&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; True&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $(MSBuildProjectDirectory)\PostSharp\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;$(MSBuildProjectDirectory) is the directory containing your .csproj file.&#10;\PostSharp\ is the directory containing local PostSharp binaries.&lt;/p&gt;&#10;&lt;p&gt;2. You will need to exclude the Aspect class itself from being woven.&lt;/p&gt;&#10;&lt;p&gt;If you are following the &lt;a class="link" href="http://www.postsharp.org/about/getting-started/" title="getting-started-sample"&#10; target="_blank" rel="noopener"&#10; &gt;getting-started sample&lt;/a&gt;, see the following example:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[Serializable]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[Trace( null, AttributeExclude = true )]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;public sealed class TraceAttribute : OnMethodBoundaryAspect&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;3. Compile your project.&lt;/p&gt;&#10;</description></item></channel></rss>