Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The <a href="http://nuget.org/packages/NuGetPowerTools" rel="noreferrer">NuGetPowerTools</a> is a package that adds some PowerShell functions that makes it easier to work with the project setup of the project you're adding a package to. To use the functions available you only need to make your package depend on the NuGetPowerTools, using the dependencies tag in your packages nuspec file like this:</p> <pre class="lang-xml prettyprint-override"><code>&lt;dependencies&gt; &lt;dependency id="NuGetPowerTools" version="0.26" /&gt; &lt;/dependencies&gt; </code></pre> <p>This will make it possible to grab a reference to a build project representation of your project.</p> <p>Then you need to put an <code>install.ps1</code> file in the <code>tools</code> folder of your NuGet package, this PowerShell file will run when you install the package and never again after installation.</p> <p>The file should look something like this:</p> <pre class="lang-powershell prettyprint-override"><code>#First some common params, delivered by the nuget package installer param($installPath, $toolsPath, $package, $project) # Grab a reference to the buildproject using a function from NuGetPowerTools $buildProject = Get-MSBuildProject # Add a target to your build project $target = $buildProject.Xml.AddTarget("PublishWebsite") # Make this target run before build # You don't need to call your target from the beforebuild target, # just state it using the BeforeTargets attribute $target.BeforeTargets = "BeforeBuild" # Add your task to the newly created target $target.AddTask("MyCustomTask") # Save the buildproject $buildProject.Save() # Save the project from the params $project.Save() </code></pre> <p>That should be it.</p> <p>Regards</p> <p>Jesper Hauge</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload