Introduction

I was recently updating my Azure DevOps Extension that I had published in the Visual Studio Marketplace. The last time I made an update to this extension was in 2019 but I already had everything in place including a DevOps pipeline, so I thought this should be easy. Well, almost. When I got to publishing the extension, I encountered an error. This article aims at unpacking the error and the solution applied to fix this.

Problem

I made my changes, all the unit tests passed and even the build pipeline generated a VSIX package — so far so good. However, when the release pipeline kicked in, it failed with the following error while trying to deploy the VSIX package to the Visual Studio Marketplace.

Image showing the error message when trying to publish a large VSIX package.

In case the screenshot above isn’t very clear, the text version is as follows:

error: Extension package is malformed/corrupted 0 [ 'error: Extension package is malformed/corrupted', '' ]

[error]tfx failed with error: Error: The process 'C:\hostedtoolcache\windows\tfx\0.7.11\x64\tfx.cmd' failed with exit code 4294967295

A quick search on the issue redirected me to this comment on a GitHub issue. Although it was for a VS Code extension, the underlying issue seemed like there was a file size limit in place when a VSIX was published to the Marketplace. This comment on the developer community forum also confirms a file size limit, although a slightly different size value.

#azure-devops #nodejs

Reducing a Visual Studio Extension (VSIX) File Size
9.05 GEEK