ERROR AS0054 - The AppSourceCop configuration must specify one of the following properties: 'mandatorySuffix', 'mandatoryPrefix', or 'mandatoryAffixes'
Describe the bug Error
To Reproduce Steps and to reproduce the behavior: Compile the project (F5)
Expected behavior Compile successfully.
Screenshots `error AS0054: The AppSourceCop configuration must specify one of the following properties: 'mandatorySuffix', 'mandatoryPrefix', or 'mandatoryAffixes'
Compilation ended at '10:30:57.201'.
Error: The package could not be created.`
5. Versions:
- AL Language: 4.0.199169
- Business Central: 14.5.35970.0
Hi! Please take a look at this issue: https://github.com/microsoft/AL/issues/5441 which is very similar. Please let me know if you have any other questions.
Related to this issue: what is AS0054 about? Please update documentation on https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/appsourcecop (and other cops).
The rule is based on https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/compliance/apptest-prefix-suffix . We are working on improving the documentation.
You should be running AppSourceCop only if you plan to submit to AppSource. If you do, the technical validation checklist contains a lot of relevant information https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-checklist-submission . AppSourceCop is meant to automate the rules in that list.
Do you plan on submitting your app to AppSource? Are there other use cases for these analyzers that we should be aware off.
The rule is based on https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/compliance/apptest-prefix-suffix . We are working on improving the documentation.
You should be running AppSourceCop only if you plan to submit to AppSource. If you do, the technical validation checklist contains a lot of relevant information https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-checklist-submission . AppSourceCop is meant to automate the rules in that list.
Do you plan on submitting your app to AppSource? Are there other use cases for these analyzers that we should be aware off.
No, we are not planning on submitting the app to AppSource right now. But we use the AppSourceCop anyway. I dont know what was the problem for this because we were working fine all this time and for some reason now we need to specify some configuration for the AppSourceCop?
The default diagnostic level for rules provided by AppSourceCop is the value that makes sense for people that submit their applications to AppSource. The idea is that if we introduce a new check, they should immediately know about it so that they can fix it before submitting their application. In this case, the diagnostic was set to Error because we want to force AppSource apps to use that property.
We could also introduce new diagnostics as informational message, but it means that the developers that need to follow them would have to do extra effort to configure them to get the diagnostic level we intended.
In the future, we plan to improve the experience around these analyzers, but for now, as you are using AppSourceCop for another purpose than what it was intended for, you should use a ruleset to configure it for your custom scenario.
I am closing this issue because it appears that it has been resolved. Please open a new issue if you believe this has not been resolved and reference the current issue.