locked
VSIX Manifest Designer Browse for Icon and Preview Image don't supply required path - expected behavior? RRS feed

  • Question

  • Using the VSIX Manifest Designer's Browse buttons to choose Icon and Preview Image files, navigating to specific images in the Resources folder results in just the file name (without the Resources part of the path) being deposited into the manifest. When the VSIX is then built and installed, the icon and preview don't appear in the Extensions and Updates list (i.e., the default images appear instead). For example, when the Browse buttons are used to select Icon.png and Preview.png, both inside the Resources folder, only the file names appear in the Designer and in the manifest file:

    The workaround is to manually type the Resources folder prefix on both, as in:

    When the folder name is prepended, the path info gets into the manifest, and the icon and preview image both ultimately appear in the Extensions and Updates list when the VSIX is installed.

    Is this expected behavior, or is this a bug in the VSIX Manifest Designer's Browse buttons?  If it is expected behavior, the Browse buttons are misleading because they don't function like standard Browse buttons (which keep track of the path to the file the user selected).


    • Edited by kengr Monday, May 23, 2016 10:38 PM
    Monday, May 23, 2016 10:30 PM

All replies

  • Hi Kengr,

    >>"For example, when the Browse buttons are used to select Icon.png and Preview.png, both inside the Resources folder, only the file names appear in the Designer and in the manifest file:"

    After you selected a image, Visual Studio will copy this Image to the top-level folder of this project. For example I have a VSIX project named myCommand, and I choose /myCommand/Resources/icon.ico as my application icon. Visual Studio will copy the image file to /myCommand folder automatically and set icon.ico as the value of Icon input box.This is the expected behavior.

    >>"The workaround is to manually type the Resources folder prefix on both"

    Good, that is the better way to set icon or preview image.

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, May 24, 2016 5:47 AM
  • You said, "After you selected a image, Visual Studio will copy this Image to the top-level folder of this project."

    But what your describing doesn't happen at all in my environment. When I use the Browse button and get the image filename only (with no path info), only the image filename is placed into the manifest, no image files are copied to the top-level folder of the project, and the images don't appear in the Extensions and Updates list when the extension is installed and run. So, what I am saying is that these two Browse buttons do not function like normal Browse buttons in Windows, if the file you browse to is not already in the top-level folder of the project, because the path information is thrown away. And again, the file is not copied behind the scenes into the top-level folder. At least not in Visual Studio 2015 Community Update 2 with all default settings.

    You said that my workaround of manually typing the path "is the better way to set icon or preview image."

    My point is that, if the image file is not already in the top-level folder of the project, the workaround of manually typing the path is not just "the better way," but is in fact the only way to pick up the images from inside a folder and get them into the extension, so that they appear in the Extensions and Updates list when the extension is installed and run.

    So, unless the image file is already in the top-level folder of the project, these Browse buttons should never be used; instead, the path should be typed in manually. Otherwise, the images don't make it into the extension.

    Monday, May 30, 2016 11:06 PM
  • Hi kengr,

    Thanks for your feedback.

    >>"When I use the Browse button and get the image filename only (with no path info), only the image filename is placed into the manifest, no image files are copied to the top-level folder of the project"

    My environment is Windows 10&Visual Studio Community 2015. Please make sure your visual studio has the write permission on your project folder. You need to run your Visual Studio as administrator.

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, May 31, 2016 8:09 AM
  • Thanks for your response. 

    My environment is Windows 8.1 Pro with Visual Studio Community 2015, I run Visual Studio as administrator, and what you're describing (Browse copying the image files behind the scenes to the top-level project folder) just doesn't happen at all in my environment.  I have triple-checked this.

    In my environment,

    • If I use the Browse button to select an image that's in the Resources folder (below the top-level folder of the project), only the filename (no path info) appears on the manifest's design page, only the filename (no path info) appears in the actual manifest, and no image file appears in the top-level project folder, even after a build. When I then install the extension, the image does not appear in the Extensions and Updates list.
    • If I completely avoid the Browse button and just type the path (including the Resources folder) into the textbox on the manifest's design page, the path ends up in the actual manifest, and after installation of the extension, the image appears in the Extensions and Updates list.

    I don't currently have a Windows 10 system with VS 2015 installed, so I can't test your specific configuration right now. But what I have described above is the behavior on Windows 8.1 Pro, running VS 2015 as administrator.

    Whether the behavior is as I describe (the path is ignored by the Browse operation, and thus the image never makes it into the extension), or as you describe (the Browse operation causes the file to be silently copied to the root of the project), either way, these are surprising behaviors for a Browse button on Windows.

    Tuesday, May 31, 2016 2:52 PM
  • Hi kengr,

    >>"My environment is Windows 8.1 Pro with Visual Studio Community 2015"

    Thanks for your feedback. I suspect it's a product issue and I would recommend you submit a feedback in http://connect.microsoft.com. Thanks for your understanding.

    In addition, I would suggest you also provide a simplified demo to add as attachment. If you finish submit, please remember to post your link here, I will help you vote it. Thanks.

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, June 2, 2016 3:16 AM