locked
How to control the template file(.zip) copy path in VSPackage RRS feed

  • Question

  • I created a VSPackage and code template(.zip), but when building, I found the tempate (Service.zip) is copied to Microsoft Visual Studio 8\Common7\IDE\ProjectTemplatesExp\CSharp\CSharp\Service.zip. 
    Notice that for template files, <OutputSubPath>CSharp</OutputSubPath> is set for child folder name.
    How could I make this path changed to ProjectTemplatesExp\MyProject\CSharp\Service.zip instead of CSharp\CSharp\Service.zip
    In fact, I don't know why that parent path is assigned to ProjectTemplatesExp\CSharp

    Target ZipFiles:
        Build_Status Zipping
        Zipping C:\Documents and Settings\liang\Desktop\MyVSIntegration\MyPkg\obj\Debug\Service.zip...
        Copying file from "C:\Documents and Settings\liang\Desktop\MyVSIntegration\MyPkg\obj\Debug\Service.zip" to "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ProjectTemplatesExp\CSharp\CSharp\Service.zip".

    I read the code of IronPython sample of VS2005 SDK but found no hint.

    Thanks.
    Thursday, September 16, 2010 8:47 AM

Answers

  • Hi Liang,

     

    Thanks for your post.

    From your description, I suspect that it caused by your <ProjectType> in the .vstemplate file.

    Do you set it as "CSharp" on your side? If so, do you mind to reset it as default like "MyProject"?

    If it doesn't help, could you please share me some reproduce steps?

    Looking forward to your reply.

     

    Best Regards,

    Ziwei Chen

    • Marked as answer by Liang Ye Saturday, September 25, 2010 2:45 AM
    Monday, September 20, 2010 9:04 AM

All replies

  • Hi Rob,

    Thanks for your posting.

    We are following up with development teams and will get back to you soon.

    Best Regards,

    Ziwei Chen

     

    Friday, September 17, 2010 9:38 AM
  • Hi Liang,

     

    Thanks for your post.

    From your description, I suspect that it caused by your <ProjectType> in the .vstemplate file.

    Do you set it as "CSharp" on your side? If so, do you mind to reset it as default like "MyProject"?

    If it doesn't help, could you please share me some reproduce steps?

    Looking forward to your reply.

     

    Best Regards,

    Ziwei Chen

    • Marked as answer by Liang Ye Saturday, September 25, 2010 2:45 AM
    Monday, September 20, 2010 9:04 AM
  • Thanks Ziwei.

    I also thought so but it didn't work.

    My ProvideProjectFactory is:

    [ProvideProjectFactory(typeof(NewServiceFactory), null,
      "My Project Files (*.csproj);*.csproj",
      "csproj", "csproj",
      ".\\NullPath",
      LanguageVsTemplate = "MyProj")]
    

     And .cstemplate is:

    <VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
     <TemplateData>
     <Name>Service</Name>
     <Description></Description>
     <ProjectType>MyProj</ProjectType>
     <ProjectSubType>
     </ProjectSubType>
     <CreateNewFolder>true</CreateNewFolder>
     <DefaultName>Service</DefaultName>
     <ProvideDefaultName>true</ProvideDefaultName>
     <LocationField>Enabled</LocationField>
     <EnableLocationBrowseButton>true</EnableLocationBrowseButton>
     <Icon>service.ico</Icon>
     <NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp> 
     </TemplateData>
    
    Or, mail my project to you for problem shooting :-)
    Monday, September 20, 2010 9:11 AM
  • Hi Liang,

     

    Sorry for the delay.

    Could you please either share the project on skydrive or send me via (tlef22 AT yahoo.com.cn).

    I'll follow up here as soon as I find something.

    Looking forward to your reply.

     

    Best Regards,

    Ziwei Chen

     

     

    Wednesday, September 22, 2010 8:32 AM
  • Hi Liang,

     

    Is it resoved?

    I didn't recieve the code.

    Thank you.

     

    Best Regards,

    Ziwei Chen

    Friday, September 24, 2010 5:22 AM
  • Sorry Victor,

    I'm late for this one because of the Mid-Autumn Festival :-)

    I've resolved this problem but I'd like to send it you via e-mail for How to deploy muti-project template in VSPackage.

    Thank you very much.

    Saturday, September 25, 2010 1:37 AM
  • it wont work like this.. need to do the registry setting to set the project Type.. pass the GUIDS in the Software\Microsoft\VisualStudio\ location
    Monday, September 27, 2010 3:49 PM