Reputation: 431
I am trying to generate multiple nuget packages using the TFS NuGetter. I am using the NuGetterMultiPkgBuildVersionedTemplate20.xaml for this. I can generate one package successfully but am having trouble in specifying multiple nuspec files.
Using the following definition sample from http://nugetter.codeplex.com/ I can successfully generate one package.
How can I specify multiple nuspec files so that it generates multiple nuget packages?
Upvotes: 2
Views: 2309
Reputation: 431
Multiple package list needs to be provided in a separate file and file needs to be mentioned in the following section in NuGetterMultiPkgBuildVersionedTemplate20.xaml
6. NuGetter (A) - PrePackaging
Multi-package List File Path -> NuGetPrePackage\AppMultiPackages.xml
Format of the file can be like this -
<?xml version="1.0"?>
<NuGetterPackages>
<NuGetterPackage name="Sample1">
<NuSpecFilePath>NuGetPrePackage\Sample1.nuspec</NuSpecFilePath>
<BasePath>NuGetPrePackage</BasePath>
<InvokePowerShell>True</InvokePowerShell>
<PowerShellScriptPath>Powershell\Sample1\PrePackage.ps1</PowerShellScriptPath>
<InvokePush>True</InvokePush>
<OutputDirectory>NuGetPackage</OutputDirectory>
<PushDestination>D:\Drops\PackageRepository\MySite\Test</PushDestination>
<Version>4.0.j.b</Version>
</NuGetterPackage>
<NuGetterPackage name="Sample2">
<NuSpecFilePath>NuGetPrePackage\Sample2.nuspec</NuSpecFilePath>
<BasePath>NuGetPrePackage</BasePath>
<InvokePowerShell>True</InvokePowerShell>
<PowerShellScriptPath>Powershell\Sample2\PrePackage.ps1</PowerShellScriptPath>
<InvokePush>True</InvokePush>
<OutputDirectory>NuGetPackage</OutputDirectory>
<PushDestination>D:\Drops\PackageRepository\MySite\Test</PushDestination>
<Version>4.2.j.b</Version>
</NuGetterPackage>
</NuGetterPackages>
Following screenshot from the documentation explains different options nicely.
Upvotes: 4