VSIX extension - How can I ensure a referenced dll or assembly is included in the VSIX file?
I found a solution to this problem, and I can see the dll now included in the VSIX and a user confirmed that it works for him.
- In Visual Studio, with the extension solution open,
- double click the .vsixmanifest file
- Open the "Assets" tab
- Click "New"
- Set Type to "Microsoft.VisualStudio.Assembly"
- Set Source to "A File on FileSystem"
- Click Browse to set Path to your dll, (don't worry the reference is not added as an absolute path, but added as a relative path or just a strong assembly name)
- You can leave "Embed in this folder" empty.
- Click OK
- Rebuild the solution, and the file should be in the VSIX file now.
This line is then added to the vsixmanifest file:
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="File" Path="Microsoft.CodeAnalysis.CSharp.dll" AssemblyName="Microsoft.CodeAnalysis.CSharp, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />