Hello, friends!

After creating a Visual Studio project ( Visual C # \ Extensibility \ C # Project Template ), removing the <Project></Project> along with its contents in the MyTemplate.vstemplate file, we get the following project:

Mytemplate

After building this project in the ** bin ** folder, an archive is created with two files:

MyTemplate.zip

How to set up a project in such a way that, when building this archive, an arbitrary folder with arbitrary files from the project would fall?

ExampleFolder

At the same time, it is impossible for the template to generate all these files when launching its shortcut from VisualStudio (that is, you cannot add files to the file with the .vstemplate extension as I understand it)

(And this cannot be done because this template is used to call the WizardTemplate which itself already generates a template along the path that is transferred from the Template itself. And the files that are in the template are conditionally used in this Wizard. Such cases)

Thanks in advance for your help!

    1 answer 1

    Could solve this problem using Post Build Action. I attached the files to the project with the compilation action "None", and in PostBuildAction I wrote a script to repack the zip file using the 7z utility.