<div dir="ltr"><div>Presuming that you are talking about MonoDevelop/XamarinStudio you'll need to add a packages.xml file to your template and add the needed import and set the proper nuget properties in the project file to have nuget-support grab and process the packages during the build. This kind of template will fail if the plugin for nuget processing is not installed in the IDE (AFAIK it is not installed by default in MD, not sure if newer versions of XS do have it in the core install).</div>
<div><br></div></div><div class="gmail_extra"><br clear="all"><div>Rafael Teixeira<br>O..:.)oooo<br></div>
<br><br><div class="gmail_quote">On Tue, Jul 29, 2014 at 6:25 AM, Sergey Khabibullin <span dir="ltr"><<a href="mailto:x2bool@gmail.com" target="_blank">x2bool@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>How can I reference a NuGet package from an xml-defined project template? Is it possible?<br></div><div><br>






<font face="Monospace">
<span style="color:rgb(51,51,51)"></span><span style="color:rgb(51,51,51)">      <</span><span style="color:rgb(51,100,164)">Project</span><span style="color:rgb(51,100,164)"> </span><span style="color:rgb(51,51,51)">name</span><span style="color:rgb(51,51,51)"> =</span><span style="color:rgb(51,100,164)"> </span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(245,125,0)">$</span><span style="color:rgb(245,125,0)">{</span><span style="color:rgb(245,125,0)">ProjectName</span><span style="color:rgb(245,125,0)">}</span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(51,100,164)"> </span><span style="color:rgb(51,51,51)">directory</span><span style="color:rgb(51,51,51)"> =</span><span style="color:rgb(51,100,164)"> </span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(245,125,0)">.</span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(51,51,51)">></span><br>


<span style="color:rgb(51,51,51)">            </span><span style="color:rgb(51,51,51)"><</span><span style="color:rgb(51,100,164)">Options</span><span style="color:rgb(51,100,164)"> </span><span style="color:rgb(51,51,51)">Target</span><span style="color:rgb(51,51,51)"> =</span><span style="color:rgb(51,100,164)"> </span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(245,125,0)">Library</span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(51,100,164)"> </span><span style="color:rgb(51,51,51)">/</span><span style="color:rgb(51,51,51)">></span><br>


<span style="color:rgb(51,51,51)">            </span><br>
<span style="color:rgb(51,51,51)">            </span><span style="color:rgb(51,51,51)"><</span><span style="color:rgb(51,100,164)">References</span><span style="color:rgb(51,51,51)">></span><br></font></div><div><font face="Monospace">                <!-- NuGet package? --><br>

</font></div><div><font face="Monospace">
<span style="color:rgb(51,51,51)">                </span><span style="color:rgb(51,51,51)"><</span><span style="color:rgb(51,100,164)">Reference</span><span style="color:rgb(51,100,164)"> </span><span style="color:rgb(51,51,51)">type</span><span style="color:rgb(51,51,51)">=</span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(245,125,0)">Package</span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(51,100,164)"> </span><span style="color:rgb(51,51,51)">refto</span><span style="color:rgb(51,51,51)">=</span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(245,125,0)">System</span><span style="color:rgb(245,125,0)">,</span><span style="color:rgb(245,125,0)"> </span><span style="color:rgb(245,125,0)">Version</span><span style="color:rgb(245,125,0)">=</span><span style="color:rgb(245,125,0)">1</span><span style="color:rgb(245,125,0)">.</span><span style="color:rgb(245,125,0)">0</span><span style="color:rgb(245,125,0)">.</span><span style="color:rgb(245,125,0)">5000</span><span style="color:rgb(245,125,0)">.</span><span style="color:rgb(245,125,0)">0</span><span style="color:rgb(245,125,0)">,</span><span style="color:rgb(245,125,0)"> </span><span style="color:rgb(245,125,0)">Culture</span><span style="color:rgb(245,125,0)">=</span><span style="color:rgb(245,125,0)">neutral</span><span style="color:rgb(245,125,0)">,</span><span style="color:rgb(245,125,0)"> </span><span style="color:rgb(245,125,0)">PublicKeyToken</span><span style="color:rgb(245,125,0)">=</span><span style="color:rgb(245,125,0)">b77a5c561934e089</span><span style="color:rgb(245,125,0)">"</span><span style="color:rgb(51,100,164)"> </span><span style="color:rgb(51,51,51)">/</span><span style="color:rgb(51,51,51)">></span><br>


<span style="color:rgb(51,51,51)">            </span><span style="color:rgb(51,51,51)"><</span><span style="color:rgb(51,51,51)">/</span><span style="color:rgb(51,100,164)">References</span><span style="color:rgb(51,51,51)">></span></font>

<br></div></div>
<br>_______________________________________________<br>
Mono-devel-list mailing list<br>
<a href="mailto:Mono-devel-list@lists.ximian.com">Mono-devel-list@lists.ximian.com</a><br>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>
<br></blockquote></div><br></div>