{"id":30,"date":"2009-09-16T14:17:30","date_gmt":"2009-09-16T12:17:30","guid":{"rendered":"http:\/\/www.limilabs.com\/blog\/?p=30"},"modified":"2012-05-12T13:40:17","modified_gmt":"2012-05-12T11:40:17","slug":"introducing-postsharp-to-your-team","status":"publish","type":"post","link":"https:\/\/www.limilabs.com\/blog\/introducing-postsharp-to-your-team","title":{"rendered":"Introducing PostSharp to your team"},"content":{"rendered":"<p>      PostSharp is <strong>AOP<\/strong> (Aspect-Oriented-Programming) framework (<a href=\"http:\/\/www.sharpcrafters.com\" rel=\"nofollow\">www.sharpcrafters.com<\/a>).<br \/>\nIt transparently inserts itself in the build process and post-processes the compiled assembly.<\/p>\n<p>To enable PostSharp in your project you need to download and run the PostSharp installer, and add appropriate references in your project.<\/p>\n<p>However if your project is in SVN, and you are not the only one compiling it (other developers, CI machine) most likely you don&#8217;t want to run PostSharp installer on all the machines.<\/p>\n<p>There is a way to introduce PostSharp <strong>transparently <\/strong> to your project.<\/p>\n<ul>\n<li>Put all the PostSharp files in the LibPostSharp folder of your project <strong>and add this folder to SVN<\/strong>.<\/li>\n<li><strong>Modify the .csproj file<\/strong>: After the last ItemGroup following xml must be inserted: <\/li>\n<\/ul>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n  &lt;propertyGroup&gt;\r\n    &lt;dontImportPostSharp&gt;True&lt;\/dontImportPostSharp&gt;\r\n    &lt;!-- Add the next line if you are using Visual Studio 2010 --&gt;\r\n    &lt;!-- &lt;postSharpUseCommandLine&gt;True&lt;\/postSharpUseCommandLine&gt;--&gt;\r\n  &lt;\/propertyGroup&gt;\r\n<\/pre>\n<ul>\n<li><strong>Modify the .csproj file<\/strong>: After the <\/li>\n<\/ul>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;import Project=&quot;$(MSBuildToolsPath)Microsoft.CSharp.targets&quot; \/&gt;\r\n<\/pre>\n<p>following xml must be inserted: <\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;import Project=&quot;..LibPostSharpPostSharp.targets&quot; \/&gt;\r\n<\/pre>\n<p>The whole change should be similar to this sample: <\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;\/itemGroup&gt;\r\n  &lt;propertyGroup&gt;\r\n    &lt;dontImportPostSharp&gt;True&lt;\/dontImportPostSharp&gt;\r\n  &lt;\/propertyGroup&gt;\r\n  &lt;import Project=&quot;$(MSBuildToolsPath)Microsoft.CSharp.targets&quot; \/&gt;\r\n  &lt;import Project=&quot;..LibPostSharpPostSharp-1.5.targets&quot; \/&gt;\r\n&lt;\/project&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>PostSharp is AOP (Aspect-Oriented-Programming) framework (www.sharpcrafters.com). It transparently inserts itself in the build process and post-processes the compiled assembly. To enable PostSharp in your project you need to download and run the PostSharp installer, and add appropriate references in your project. However if your project is in SVN, and you are not the only one [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[15,43],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-programming","tag-c","tag-postsharp"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/30"}],"collection":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":9,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":2758,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/30\/revisions\/2758"}],"wp:attachment":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}