Nugetter with TFS build in the cloud

Feb 3, 2014 at 5:17 PM
I am trying to use Nugetter with TFS in the cloud. It seems that Nugetter is not able to find the files in the drop location. The build always fail with this error:

Error reported in the NuGet Process: File not found: 'novIQ.AuthenticationManager.dll'.

Here is my nuspec file:

<package >
<metadata>
<id>novIQ.AuthenticationManager</id>
<version>1.1</version>
<title>novIQ.AuthenticationManager</title>
<authors>novIQ Intégration</authors>
<owners>novIQ Intégration</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Logique d'intégration à un répertoire d'authentification</description>
<releaseNotes>Version initiale.</releaseNotes>
<copyright>Copyright 2013</copyright>
</metadata>
<files>
<file src="novIQ.AuthenticationManager.dll" target="lib" />
</files>
</package>

And at the end of the build, the file novIQ.AuthenticationManager.dll is really in the drop location. I don't use prepackaging and did not specify a basepath. What is wrong with my setup?

Here is the relevant part of the log file of the build process:

Create Output Folder if necessary
Valeurs initiales de la propriété
DropLocation = $/FT/Drops/TestPushNuget/TestPushNuget_20140203.1
FolderName = NuGetPackage
Valeurs finales de la propriété
DropLocation = $/FT/Drops/TestPushNuget/TestPushNuget_20140203.1
FolderCreated = $/FT/Drops/TestPushNuget/TestPushNuget_20140203.1\NuGetPackage
FolderName = NuGetPackage

00:00
CreateFolder - Use to get BasePath full path
Valeurs initiales de la propriété
DropLocation = $/FT/Drops/TestPushNuget/TestPushNuget_20140203.1
FolderName =
Valeurs finales de la propriété
DropLocation = $/FT/Drops/TestPushNuget/TestPushNuget_20140203.1
FolderCreated = $/FT/Drops/TestPushNuget/TestPushNuget_20140203.1
FolderName =

00:04
Call NuGet Package Command Line
Valeurs initiales de la propriété
AdditionalOptions =
BasePath = $/FT/Drops/TestPushNuget/TestPushNuget_20140203.1
NuGetExeFilePath =
NuSpecFilePath = C:\a\NuGetPackageSupport\novIQ.AuthenticationManager.nuspec
OutputDirectory = $/FT/Drops/TestPushNuget/TestPushNuget_20140203.1\NuGetPackage
VersionNumber =
In CallNuGetPackageCommandLine:
nuGetExeFilePath:
basePath: $/FT/Drops/TestPushNuget/TestPushNuget_20140203.1
outputDirectory: $/FT/Drops/TestPushNuget/TestPushNuget_20140203.1\NuGetPackage
versionNumber:
additionalOptions:
CallNuGetPackageCommandLine arguments: pack "C:\a\NuGetPackageSupport
ovIQ.AuthenticationManager.nuspec" -OutputDirectory "$/FT/Drops/TestPushNuget/TestPushNuget_20140203.1\NuGetPackage" -BasePath "$/FT/Drops/TestPushNuget/TestPushNuget_20140203.1"
Error reported in the NuGet Process: File not found: 'novIQ.AuthenticationManager.dll'.

Thank you!
Feb 26, 2014 at 4:50 PM
Hello,

Is there somebody who is in charge of the discussions in the nugetter project? I just want to know if i should continue to try to make nugetter work in the cloud or if it's not designed for this.

Thank you!
Mar 26, 2014 at 4:31 PM
It works based on my experience, see my other reply.
Mar 26, 2014 at 11:55 PM
Dont know how you make it work; even with version 2.2, i had to fork the github repository and make some correction to make it works.
Mar 27, 2014 at 12:16 PM
Edited Mar 27, 2014 at 12:20 PM
I can confirm it works without any hack for both single package and multiple packages.

The trick is: Don't expect anything in the DROP location.

The reason is simple, if you look at your online build log, you might notice something like this in the end:
If

00:03
Should we Push the package

00:03
Do Push

00:00
Get NuGetterVPackageName

00:00
GetFileNameUsingPattern
Path found: #/1861/drop\NuGetPackage\ClassLibrary1.1.0.14086.5.nupkg

00:00
If

00:00
If API Key is in a file in source control - go get it

00:00
GetApiKey
API key was provided in the build definition.

00:03
PushWithNuGet
Push Arguments: push "#/1861/drop\NuGetPackage\ClassLibrary1.1.0.14086.5.nupkg" xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -s "https://xxxxxxxx.myget.org/F/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/api/v2/package"
NuGet Process execution time: 3

00:00
If push fails then report partial failure on build

00:00
Assign

00:00
Drop Files to Drop Location

00:00
Run here if On-Premise TFS Build
This simply means that Drop Files to Drop Location only happens at the very end, so all your effort trying to find anything for any purpose in the Drop won't success.

The correct place can be found like this: in VS 2013, Team Explorer - Builds, Manage Build Controllers, find the Hosted Build Agent, click Properties, in the Working Directory, you might have something like $(SystemDrive)\a, if that's the case, then you can find your dlls in C:\a\Binaries, you should be able to confirm this if you open the MS Build Log.

In your build def, Process, 7. NuGetter (B) - Package, set Base Path to C:\a\Binaries, that's it.

Best,

Dong
Mar 27, 2014 at 1:43 PM
I see; the correction i made in the source provide the real value for $tfsDropFolder in the powershell script; that way, the script don't have to depend on the fact that C:\a\Binaries contains the output of the build. If for some reason, TF Service change the way it works and change the location of the output of the build, the build will still succeed to produce and publish the NuGet package.