0
votes

I have some issues with dependencies in my visual studio extension. One of the solutions is to IlMerge all my dlls into a single dll. I came up with a solution to create a custom msbuild task which will be run in AfterBuild event (After vsix is created). This is what task does:

 1. Unzip .vsix content.
 2. Find all dlls and merge them into a single one.
 3. Replaces all dlls with merged.dll in vsix.

The issue is that dlls are listed in manifest.json and extension.manifest and when I try to install vsix it complains that it doesn't find required dlls. Also I need to add merge.dll into manifest.json somehow.

It seems like common issue but I couldn't find the proper solution to this kind of problem. Any ideas of solving this issue or doing it in a different way would be appreciated

1

1 Answers

0
votes

A VSIX package follows the Open Packaging Conventions (OPC). As such, it is not just a .zip file that can be manipulated using System.IO.Compression (that would only work, if any, to replace files, already declared in the manifest). You need to use System.IO.Packaging, which is what the VS SDK uses internally in the MSBuild task that generates the VSIX file.

But there should be an easier way to handle your dependencies.