This project is read-only.

TFS build error Exception Message: File not found (type FileNotFoundException)

Aug 1, 2013 at 5:48 PM
I am trying to get the Nugetter templates to work with my TFS 2012 install and i think i have things set up correctly. My Solution now builds, but at the end i have an error about Nuget.
Does any one know where i should look to fix this?
Exception Message: File not found (type FileNotFoundException)
Exception Stack Trace:    at TfsBuild.NuGetter.Activities.XmlGetElement.GetXmlElementValue(String filePath, String xpathExpression, String xmlNamespace, String xmlNamespacePrefix)
   at TfsBuild.NuGetter.Activities.XmlGetElement.Execute(CodeActivityContext context)
   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Aug 14, 2013 at 12:24 PM
Edited Aug 14, 2013 at 3:38 PM
I had exactly same problem,

Found issue: when creating new .ps1 and .nuSpec files in .nuget folder (I created by copying and pasting existing), VS saved files to solution root, not .nuget folder as you would expect, so could not find files specified in the spec xml file.
  <NuGetterPackage name="xxxxx">
    <NuSpecFilePath>.nuget\xxxxx.nuspec</NuSpecFilePath>
    <BasePath>NuGetPrePackage_xxxxx</BasePath>
    <InvokePowerShell>True</InvokePowerShell>
    <PowerShellScriptPath>.nuget\PrePackage_xxxxx.ps1</PowerShellScriptPath>
    <InvokePush>True</InvokePush>
    <OutputDirectory>NuGetPackage</OutputDirectory>
    <PushDestination>\\xxxxxserver\xxxxNuGetFeed</PushDestination>
    <Version>1.0.j.B</Version>
  </NuGetterPackage>
Moved files (and manually updated sln file) and all worked beautifully (after a little TFS jiggery pokery)

Hope this helps you if you have not already found issue.
Feb 16, 2015 at 2:53 PM
Edited Feb 16, 2015 at 2:56 PM
In my case it was different issue.
Issue was with missing nuspec file in folder $BuildActivities\Nuspec.

I just created/added the file TFS. it started working..

file contains..
<package >
<metadata>
<id>XXX.Data.All</id>
<version>1.0.0</version>
<title>XXX.Data.All</title>
<authors>Manoj Patil</authors>
<owners>XXX, In</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Some description</description>
<releaseNotes>Summary of xxxx.xx.Data.All</releaseNotes>
<copyright>xxxx.xxx.Data.All</copyright>
<tags>OTP Shared</tags>
<dependencies>
  <dependency id="Autofac" version="2.6.3.862"/>
  <dependency id="Autofac.Wcf" version="2.6.3.862" />      
  <dependency id="FluentValidation" version="3.1.0.0" />
</dependencies>
</metadata>
</package>

for detail information visit TFS with powershell link