VSTA Deployment

Latest post 09-08-2008 1:24 PM by Gary. 5 replies.
  • 07-12-2008 6:20 AM

    VSTA Deployment

    For deployment we are working with “vsta_aide.msi” without option of integrating it with VS2005. But in this process, Projectgen.exe is not getting copied to target machine. What do I need to do?
    Nitin Umap Software Professional
  • 07-12-2008 11:45 AM In reply to

    • Melody
    • Top 10 Contributor
    • Joined on 04-26-2007
    • Syracuse, NY
    • Posts 245

    Re: VSTA Deployment

    nitinumap,
    >How to provide "Register template with host application" option through template descriptor xml.

    This is not possible.  Selecting this option in ProjectGen registers the template with both VSTA and Visual Studio.  To register a template from the command line run setup for VSTA, then Visual Studio once the VSTA setup is done (this takes 1-2 minutes).

    >For deployment we are working with “vsta_aide.msi” without option of integrating it with VS2005. But in this process, Projectgen.exe is not getting copied to target machine. What do I need to do?

    This is not a recommended deployment scenario for 2 reasions:
    1)  ProjectGen is part of the VSTA SDK- "typical end user" target machines should not have the entire SDK installed, only the runtime and design time bits.  ProjectGen should only be installed on machines where the user will be creating project templates.  If your target users will be creating project templates then they must have both the VSTA v 1 SDK and Visual Studio 2005 (VS2005 is a prequiste for the VSTA v 1 SDK)

    2)  Robust templates require manual editing.  For example specifying the version of the proxy assembly to use or adding a post build event



    Hope this helps!
    Thanks,
    -Melody
  • 07-14-2008 9:55 AM In reply to

    • Gary
    • Top 10 Contributor
    • Joined on 07-13-2006
    • Posts 318

    Re: VSTA Deployment

    nitinumap,

    Just to clarify:

    ProjectGen is a tool used by you, the software developer to create default VSTA project templates installed and registered along with your application and VSTA msi files.  ProjectGen is *not* used by the end users of your application.

    You'll want to use projectgen to create a basic VSTA project template or set of templates for the end user of VSTA to select with File | New.. Project.   When the project templates you created are installed and registered, they will be displayed in the New Project dialog.  These project templates are installed with your application, not ProjectGen.  

    To register the default templates on the end user machine, your installer will run vsta /hostid <appname> /setup

    (this is documented in the SDK)

    Also: The VSTA end user also has the ability to create their own project templates from the VSTA IDE (File | Export Template...).  But these end-user project templates all originate from projects they created using the default project templates you have installed with the application.

     

    Hope this helps!

  • 09-08-2008 5:18 AM In reply to

    Re: VSTA Deployment

    So far, so nice.
    But when I read this one question really bothers me. The project template contains the path to the host application. This path must be adapted during installation process on the target host. How to do this. Handling .zip Files is not really supported by Windows (Of course, there is Shell32.dll but it doesn't allow to delete Files and prompts the User if the changed project file is copied back to the .zip Archive :-(( ). And I'm of the opinion that there should be a way of installing VSTA without being forced to install some 3rd Party Components on the target PC.
  • 09-08-2008 1:22 PM In reply to

    • Melody
    • Top 10 Contributor
    • Joined on 04-26-2007
    • Syracuse, NY
    • Posts 245

    Re: VSTA Deployment

    sweiberg,
    The ShapeAppCSharp samples handle this issue by using a registry entry instead of an absolute location in the project templates.  I'm not sure if you can enter this directly into ProjectGen or if you will have to manually change the template (click here for a tutorial on updating templates).  This entry is added by the setup file.

    Template proj file:
    DebugInfoExeName="#HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ShapeAppCSharp\InstallPath#\ShapeAppCSharp.exe"

    Setup File:
    var hostID = "ShapeAppCSharp";
    var manufacturer = "Microsoft";
    var installPath = fso.BuildPath(sampleRootPath, "core\\basic\\bin\\debug");

            wshShell.RegWrite("HKLM\\Software\\" + manufacturer + "\\" +
                hostID + "\\", "");
            wshShell.RegWrite("HKLM\\Software\\" + manufacturer + "\\" +
                hostID + "\\InstallPath", installPath, "REG_SZ");

    Registry Entry:
    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ShapeAppCSharp]
    @=""
    "InstallPath"="C:\\ShapeAppSamples\\ShapeAppBasicCSharp\\core\\basic\\bin\\debug"


    I hope this helps, please let me know if you have any questions.
    Thanks,
    -Melody
  • 09-08-2008 1:24 PM In reply to

    • Gary
    • Top 10 Contributor
    • Joined on 07-13-2006
    • Posts 318

    Re: VSTA Deployment

    You can create an 'InstallPath' registry entry for your application path, just like the samples do:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ShapeAppCSharp]
    @=""
    "InstallPath"="C:\\VSTA\\ShapeAppAdvancedCSharpGenerics\\ShapeAppAdvancedCSharpGenerics\\core\\advanced\\bin\\debug"

    And use that registry entry in the template you install to define the application path for VSTA debugging:

    (here's the actual entry inside project template .csproj file for ShapeAppCSharp's app-level project template)

    DebugInfoExeName="#HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ShapeAppCSharp\InstallPath#\ShapeAppCSharp.exe"

Page 1 of 1 (6 items) | RSS
Copyright Summit Software Company, 2008. All rights reserved.