I have tried this against these versions:
Azure DevOps Server 2022.0.1 (AzureDevOpsServer_20231109.3)
Azure DevOps Server 2022.2 (AzureDevopsServer_20250213.1)
I use this publish command. Redacted the url, pat, and extension path
tfx extension publish --service-url https://tfs.example.com --auth-type pat --token **** --vsix **** --no-wait-validation
When publishing an extension with 0.21.0 I get this error back:
error: No MediaTypeFormatter is available to read an object of type 'ExtensionPackage' from content with media type 'application/octet-stream'
I reverted back to 0.20.0 and it worked with that version.