The AppSourceCop configuration must specify one of the following properties: 'mandatorySuffix', 'mandatoryPrefix', or 'mandatoryAffixes'

Hello Expert,

I was trying to use code analysis in my local test app in BC 16. I have done the setup and trying to publish my app but I am getting below error

“The AppSourceCop configuration must specify one of the following properties: ‘mandatorySuffix’, ‘mandatoryPrefix’, or ‘mandatoryAffixes’”

I am not sure where I am doing wrong. Here is below my setting file

{
“workbench.colorTheme”: “Visual Studio Dark”,
“al.codeAnalyzers”: [
“${AppSourceCop}”,
“${CodeCop}”
]
}

I did some exploration regarding this and they said that I need to configure AppSourceCop.Json file, I have not found where I can get this json file. Can anyone help me regarding this?

Thank you

It’s a new rule requiring you to specify the prefix/suffix.

Check here:
docs.microsoft.com/…/appsourcecop-as0054-appsourcecopconfigurationmustspecifyaffixes

Hello Erik,

Thanks for your reply. I have gone through with this doc. My question was where do I get the AppSourceCop.json configuration file,

I am not sure if it generate automatically or I need to write something.

Thank you

Just create the file in the workspace root, it’s a JSON file, so it’ll look like this:

pastedimage1597680813227v1.png

Make sure that your app name and publisher are the same as the offer in the Commercial Marketplace

It works like a charm.

Thank you Daniel & Erik

You’re welcome Devesh [emoticon:c4563cd7d5574777a71c318021cbbcc8]