Hi.
My VS extension consists of a "main" extension package DLL and a "helper" DLL. I want the VSIX file to contain just those two DLLs and no others. The helper DLL references other DLLs within its own project. However, I am using ILMerge to incorporate all those DLLs into the helper DLL as a post-build event, and so those DLLs are not needed in the VSIX and I don't want them to be there (that's why I am using ILMerge). I am using VS 2017.
When I do a build, sometimes the VSIX will contain just the main DLL and the helper DLL, sometimes it will contain all the other DLLs that the helper DLL references in its own project. More precisely, if I only modify a source file of the "main" DLL project and rebuild, only the main DLL will get rebuilt and the VSIX will contain only the main DLL and the helper DLL; whereas if Imodify asource file of the helper DLL and rebuild, the helper DLL will get rebuilt and the VSIX will also contain all the DLLs referenced by the helper DLL.
I tried to explicitly add references to the other DLLs in the "main" DLL project marking them as copylocal=false, but the outcome is the same.
Why does the build sometimes decide to include some DLLs and sometimes decide not to include them in the VSIX? How do I prevent the inclusion?