Can I choose which PostSharp projects are processing instead of reporting this to exclude?

I can specify the SkipPostSharp constant to exclude the project from the list of PS projects. Although I want to do it the other way around. I want PS to assume that it should not process everything that I am not specifically talking about.

Is this achievable?

+5
source share
1 answer

There are three conditions for automatically processing a PostSharp project:

  • PostSharp was installed using the installer.
  • The project has a link (direct or indirect) to PostSharp.dll.
  • The MSBuild SkipPostSharp property is different from true, and the SkipPostSharp compilation symbol is undefined.

- , PostSharp VS-.

PostSharp , SkipPostSharp = True . , PostSharp.Custom.targets :

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
     <SkipPostSharp Condition="'$(SkipPostSharp)'==''">True</SkipPostSharp>
  </PropertyGroup>
</Project>

, PostSharp, SkipPostSharp = False. , "" "".

+14

All Articles