Windowstemplatestudio: Optimize file extraction on VSIX install/ Package download

Created on 25 Apr 2018  路  5Comments  路  Source: microsoft/WindowsTemplateStudio

Currently we place the template file and then extract and move files client side. This adds weight and

  • Why do the files not live in the same folder as the extension?
  • Can we ship the VSIX pre-expanded.

    • file size, it is a zip anyways so we still have file savings.

  • Is it possible to break apart the templates into smaller bits?

    • I can't see why it wouldn't be ok for duplicates if we have a single master that we create the files from

Updated action plan:

  • [x] Study possibility to include templates unzipped
  • [x] Study possibility to extract and use templates from Vsix installation folder
  • [x] Study possibility to extract templates directly from Vsix to ProgramData
  • [x] Extract templates downloaded/from Vsix to ProgramData
Can Close Out Soon Infrastructure enhancement question

All 5 comments

We cannot add the templates without zipping them to the vsix, because all content in the vsix should be signed, so we'll have to maintain the extraction part.
Regarding the copy:
I tried to extract the Templates.mstx to the vsix installation folder, but got exceptions because file names exceed limits. We could shorten folder names (especially in composition templates some are very long) but we came also up with the possibility of extracting templates from the installation directory directly to the working folder (program data).
This would allow us to skip the copy step and maintain the current template folder structure at a time.

Extraction from vsix installation folder directly to the programData folder with splitted templates takes 10 sec for C# and 7 for VB. In comparison currently it takes 19 sec to extract and 10 to copy. I think this is the way we should go.

Extraction from vsix installation folder directly to the programData folder with splitted templates takes 10 sec for C# and 7 for VB. In comparison currently it takes 19 sec to extract and 10 to copy. I think this is the way we should go.

Just want to check there's no possible negative side-effect if this fails part way through. Is the recovery from this still ok?

Yep. Extraction is done to {versionnumber}_tmp directory, and then renamed, if you cancel (or sth fails) the next time you start the wizrad, the _tmp directory is deleted and the process starts over again.

Verified on dev-nightly:
Templates version: 0.19.18316.2
Wizard version: 0.19.18316.1

Was this page helpful?
0 / 5 - 0 ratings