*.psproj not excluding the class or method

n_k_manish's Avatar

n_k_manish

07 Jun, 2017 12:09 AM

Hi team,

I am trying to exclude the class or method from configuration file ( *.psproj file ) for specific project. but it is not excluding, What went wrong. Please correct me. Please find the attachment of psproj config file.I am using two version of postsharp 4.3.23 and 3.1.46 but using same psproj structure.

  1. Support Staff 1 Posted by PostSharp Techn... on 08 Jun, 2017 07:21 AM

    PostSharp Technologies's Avatar

    Hello,

    We cannot find your customer and license information. Could you please tell us which license key you are using?
    Thanks,

    -gael

  2. 2 Posted by n_k_manish on 09 Jun, 2017 03:38 AM

    n_k_manish's Avatar

    *.psproj file issue releated to license.? or you answer my other thread question ?

  3. Support Staff 3 Posted by PostSharp Techn... on 14 Jun, 2017 02:59 PM

    PostSharp Technologies's Avatar

    Hello,

    I cannot find the attached psproj file. Probably there was an error during upload. Please note that we provide support on this forum primarily to our commercial customers. It looks like we don't have any commercial license associated with your email in our database. If you are an Express user then please consider posting this question on StackOverflow and marking it with the "postsharp" tag.

    Best regards,
    Alex

  4. Support Staff 4 Posted by PostSharp Techn... on 26 Jun, 2017 10:57 AM

    PostSharp Technologies's Avatar

    Hello,

    We are going to close this request as there have not been any further updates. Please feel free to reopen the discussion if you need more help.

    Thanks,
    PostSharp Team

  5. PostSharp Technologies closed this discussion on 26 Jun, 2017 10:57 AM.

  6. n_k_manish re-opened this discussion on 17 Sep, 2017 02:44 PM

  7. 5 Posted by n_k_manish on 17 Sep, 2017 02:44 PM

    n_k_manish's Avatar

    I got the solution after including the below code.
    using PostSharp.Extensibility;
        [PSerializable]
        [MulticastAttributeUsage(AllowExternalAssemblies = true, Inheritance = MulticastInheritance.Multicast)]
        public class TraceLogProvider : MethodLevelAspect, IAspectProvider
        {
            public IEnumerable<AspectInstance> ProvideAspects(object targetElement)
            {
                yield return new AspectInstance(targetElement, new TraceLog());
            }
        }
    Add the below lines in psproj file.
    Excluding class:
    <d:TraceLog AttributeExclude="True"
       AttributeTargetTypes="regex:Class1|Class2">
        </d:TraceLog>
    Excluding Members:
    <d:TraceLog AttributeExclude="True"
       AttributeTargetMembers="regex:Method1|Method2">
        </d:TraceLog>

  8. PostSharp Technologies closed this discussion on 19 Sep, 2017 05:47 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac