Austin Agile DevOps

DevOps in the Cloud
posts - 70 , comments - 7 , trackbacks - 0

Microsoft.WITDataStore.dll not found: NuGet NuSpec References

I ported my TFS API code to  use the V12 (2013) assemblies. I then built and created a NuGet package of the TFS API Lib and installed it in an application. Immediately that application build failed because the Microsoft.WITDataStore.dll assmebly was missing from my TFS API NuGet package. 

I found that by default, when the reference tag is not used at all, NuGet adds all files included in the lib folder as references.  I needed the Microsoft.WITDataStore.dll in the package lib folder, but not added as as a reference (this fails).

The solution was to update my NuSpec file to explicitly mark the files I wanted added as references to the project.

<package xmlns="">
      <authors>Bob Hardister</authors>
      <description>A set of methods to get and set information in TFS 2013</description>
      <summary>Library of TFS API Methods.</summary>
        <dependency id="RavenDB.Client" version="2.5.2910" />
        <reference file="Microsoft.TeamFoundation.Build.Activities.dll" />
        <reference file="Microsoft.TeamFoundation.Build.Client.dll" />
        <reference file="Microsoft.TeamFoundation.Build.Common.dll" />
        <reference file="Microsoft.TeamFoundation.Build.Workflow.dll" />
        <reference file="Microsoft.TeamFoundation.Client.dll" />
        <reference file="Microsoft.TeamFoundation.Common.dll" />
        <reference file="Microsoft.TeamFoundation.VersionControl.Client.dll" />
        <reference file="Microsoft.TeamFoundation.VersionControl.Common.dll" />
        <reference file="Microsoft.TeamFoundation.WorkItemTracking.Client.dll" />
        <reference file="Microsoft.TeamFoundation.WorkItemTracking.Common.dll" />
        <reference file="Microsoft.TeamFoundation.WorkItemTracking.Proxy.dll" />
        <reference file="NLog.dll" />
        <reference file="TfsApiLib.Tool.Methods.dll" />
        <reference file="TfsApiLib.Tool.RunProcess.dll" />
      <file src="bin\$configuration$\Microsoft.TeamFoundation.*" target="lib\net45" />
      <file src="bin\$configuration$\Microsoft.WITDataStore.dll" target="lib\net45" />
      <file src="bin\$configuration$\NLog.dll" target="lib\net45\NLog.dll" />
      <file src="bin\$configuration$\TfsApiLib.Tool.*" target="lib\net45" />

Print | posted on Tuesday, September 30, 2014 8:41 AM |


No comments posted yet.
Post A Comment

Powered by: