I have some best practices errors that I would like to supress.. I'm not having any luck with the attribute OR the file.. as below.. can anyone shed some light on this for me please?
I haven't found any information about using the attribute apart from to suppress "BPParameterNotUsed" .. can it be used to suppress anything else?
For example:
Display method displayLocationDescription on control Address_displayLocationDescription in form AGCPlantRequest not cached
Actually it is (or should be?) cached but I'm still getting the error:
And, assuming the above can't be used on objects.. I am having trouble with using the the BPSuppression.xml file too!
Example error:
Description: Path: [AxDataEntityViewExtension/EcoResReleasedProductV2Entity.AGC/Relations/CatchWeightItemHandlingPolicy/RelatedDataEntity]:Referenced object 'WHSCatchWeightItemHandlingPolicyEntity' is marked as obsolete.
Project: 645_PlantHire (VAR) [AGC]
Path: K:\AosService\PackagesLocalDirectory\AGC\AGC\AxDataEntityViewExtension
File: K:\AosService\PackagesLocalDirectory\AGC\AGC\AxDataEntityViewExtension\EcoResReleasedProductV2Entity.AGC.xml
still appearing after I have added this file:
K:\AosService\PackagesLocalDirectory\AGC\AGC\AxIgnoreDiagnosticList\AGC_BPSuppressions.xml
<?xml version="1.0" encoding="utf-8"?>
<IgnoreDiagnostics xmlns:xsi="">www.w3.org/.../XMLSchema-instance" xmlns:xsd="">www.w3.org/.../XMLSchema">
<!--
*************************************************************************************************************************
*** START OF XML SCHEMA
*************************************************************************************************************************
-->
<xs:schema xmlns:xs="">www.w3.org/.../XMLSchema" id="defaultSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
<xsd:element name="Name" type="xsd:string" />
<xsd:element name="Items">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="Diagnostic">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="DiagnosticType" type="xsd:string" />
<xsd:element name="Severity" type="xsd:string" />
<xsd:element name="Path" type="xsd:string" />
<xsd:element name="Moniker" type="xsd:string" />
<xsd:element name="Message" type="xsd:string" />
<xsd:element name="Justification" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xs:schema>
<!--
*************************************************************************************************************************
*** START OF XML BODY
*************************************************************************************************************************
-->
<Name>AGC_BPSuppressions</Name>
<Items>
<!-- Diagnostic item template
<Diagnostic>
<DiagnosticType>BestPractices</DiagnosticType>
<Severity>Warning</Severity>
<Path>(path given in warning messsage)</Path>
<Moniker>(moniker given in error message)</Moniker>
<Message>(message displayed by the best practices)</Message>
<Justification>(a justification for why you are ignoring this message)</Justification>
</Diagnostic>
-->
<!--
*************************************************************************************************************************
*** Suppressions
*************************************************************************************************************************
-->
<Diagnostic>
<DiagnosticType>BestPractices</DiagnosticType>
<Severity>Warning</Severity>
<Path>dynamics://DataEntityViewExtension/EcoResReleasedProductV2Entity.AGC/Relations/CatchWeightItemHandlingPolicy/RelatedDataEntity</Path>
<Moniker>ReferencedObjectIsObsolete</Moniker>
<Message>Referenced object 'WHSCatchWeightItemHandlingPolicyEntity' is marked as obsolete. </Message>
<Justification>Extension of EcoResReleasedProductV2Entity, not able to remove reference to WHSProductFilterGroupEntity from underlying entity.</Justification>
</Diagnostic>
<Diagnostic>
<DiagnosticType>BestPractices</DiagnosticType>
<Severity>Warning</Severity>
<Path>dynamics://DataEntityViewExtension/EcoResReleasedProductV2Entity.AGC/Relations/WHSProductFilterGroups/RelatedDataEntity</Path>
<Moniker>ReferencedObjectIsObsolete</Moniker>
<Message>Referenced object 'WHSProductFilterGroupEntity' is marked as obsolete. </Message>
<Justification>Extension of EcoResReleasedProductV2Entity, not able to remove reference to WHSProductFilterGroupEntity from underlying entity.</Justification>
</Diagnostic>
<Diagnostic>
<DiagnosticType>BestPractices</DiagnosticType>
<Severity>Warning</Severity>
<Path>dynamics://DataEntityViewExtension/EcoResReleasedProductV2Entity.AGC/Fields/PackageHandlingTime/DataField</Path>
<Moniker>ReferencedObjectIsObsolete</Moniker>
<Message>Referenced object 'WMSPickingQtyTime' is marked as obsolete. </Message>
<Justification>Extension of EcoResReleasedProductV2Entity, not able to remove reference to WHSProductFilterGroupEntity from underlying entity.</Justification>
</Diagnostic>
</Items>
</IgnoreDiagnostics>
Thanks Harry, I've read through the link you provided.. but yes I think I have done what I'm meant to for both approaches.
One thing I'm not sure is of the file path. I tried to figure it out from the places I could see a likely value as detailed below... but maybe I have this wrong?
In the output window when I build I see one like this:
K:\AosService\PackagesLocalDirectory\AGC\AGC\AxForm\AGCPlantRecord.xml(0,0): BPCheckDisplayMethodCached: Display method offHireMinDate on control HireDates_offHireMinDate in form AGCPlantRecord not cached
In the error list I see three more:
Path: [AxDataEntityViewExtension/EcoResReleasedProductV2Entity.AGC/Relations/CatchWeightItemHandlingPolicy/RelatedDataEntity]:
Referenced object 'WHSCatchWeightItemHandlingPolicyEntity' is marked as obsolete. 645_PlantHire (VAR) [AGC] 1
K:\AosService\PackagesLocalDirectory\AGC\AGC\AxDataEntityViewExtension
K:\AosService\PackagesLocalDirectory\AGC\AGC\AxDataEntityViewExtension\EcoResReleasedProductV2Entity.AGC.xml 0 0 Build
I'm also apparantly meant to be able to see it in K:\AosService\PackagesLocalDirectory\AGC\BuildProjectResult.xml but this doesn't show my best practices (only an AssemblyFileNotFound warning as below).
<?xml version="1.0" encoding="utf-8"?>
<Diagnostics
GenerationTime="2022-08-25T01:53:25.7118191+00:00">
<Items>
<Diagnostic>
<DiagnosticType>ExternalReference</DiagnosticType>
<Severity>Warning</Severity>
<Path>dynamics://Reference/Azure.Core</Path>
<Moniker>AssemblyFileNotFound</Moniker>
<Message>Assembly 'Azure.Core, Version=1.15.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' failed to load because it was not found.</Message>
</Diagnostic>
It seems you tried both ways, which can be used generally. Still sharing this link to double check for any missing link,
www.theaxapta.com/.../best-practice-bp-warning-suppression-in.html
HI André,
Yes it does:
I've tried editing in a separate instance of Visual Studio too, as I read that it should be done that way.. but didn't seem to make any difference.
Thanks :-)
Angela
Hi Angela,
If you Right-click on the project and select ‘Edit Best practice Suppression’, does this open your BP suppression XML file?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156