Question Add Assembly Reference to the Template with Path

  • Wednesday, July 18, 2012 10:20 AM
     
     

    Hello, I have a Question:

    I create a Template. The Template Source have two Assembly references to assemblies that were on each client on the same place like:

    C:\Develop\MyAssemblies\*.dll

    If I create the Template, all works fine. But when I create a project from my Template, I can see the references in my Project, But the two assemblies of my own I have exclamation mark. When I look to the Properties of one of my Assemblies, in the section Path there is nothing. But I expected this

    C:\Develop\MyAssemblies\*.dll

    because, everywhere I install my Template on the Client, I install also the Assemblies in the "C:\Develop\MyAssemblies" folder!

    I tried IWizard to copy these Assemblies without any success.

    I tried VSIX Template to copy these Assemblies, when I create a Project of my Template without any success.

    Now I wanted to try to put my Assemblies on every Client of our developers. And when they Create a Project from my Template, the assemblies are still there. But in References I get Exclamation Marks!!!!!

    Who can I solve the Problem?????

    Greetings from Germany.

    Michael


    Dipl. Inform. Michael Burkhardt NRW, Dortmund

All Replies

  • Thursday, July 19, 2012 3:15 AM
    Moderator
     
     

    Hi Michael,

    I think you defined your reference wrong in your .*proj file. Is the path right in your .*proj file?

    Please check your reference in your .*proj file in the .zip file of your template.

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

  • Friday, July 20, 2012 6:11 PM
     
     
    I'm having the exact same problem. When I create my custom template, the .dll file does not appear in the project folder. The path is correct. I compared the .csproj files of a project I created with the project the template created and they have the same path. I must be missing a step that adds the .dll to the newly created project.
  • Monday, July 23, 2012 9:32 AM
    Moderator
     
      Has Code

    Hi Michael,

    I think you need add your folder which has .dll files to your template .zip file.

    Don't foget to then in your .vstemplate file like:

    <Folder Name="MyAssemblies" TargetFolderName="MyAssemblies">
            <ProjectItem ReplaceParameters="true" TargetFileName="*.dll">*.dll</ProjectItem>
          </Folder>

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

  • Friday, July 27, 2012 9:23 AM
    Moderator
     
     

    Hi Michael,

    Can your issue be sloved?

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

  • Friday, August 03, 2012 2:45 PM
     
     

    A solution is to add assemblies to the gac, but can't be done using a vsix. You need to do it with an installer !

    In that case, your template will not have to specify a directory for the assembly, visual studio will find it automatically

    EDIT : I'm wrong, the Ego Jiang response is quite better :)