2

I developed an item template whos's located in:

C:....\Documents\Visual Studio 2017\Templates\ItemTemplates

On my code i'm using AddFromTemplate() method to load my item template. The item template has a $CustomParameter$ but i dont want to pass the value in the vstemplate file. I want to pass a value from my code.

I'm trying to use replacementsDictionary.Add("$CustomParameter$", "WhatIwant") but this not working because the item it's not on my solution. But if i use this:

<CustomParameters>  
    <CustomParameter Name="$CustomParameter$" Value=""/>  
</CustomParameters> 

on the vstemplate located in the folder above it works well but i can pass the value who i want.

Any suggestion?

Source: https://msdn.microsoft.com/en-us/library/ms185301.aspx; https://msdn.microsoft.com/en-us/library/0c672h41.aspx

Bro
  • 63
  • 5

0 Answers0