I get the following error when trying to perform a NuGet pack.
The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WCF\Microsoft.VisualStudio.ServiceModel.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. C:\Projects\MyProject.csproj
I am trying to perform the pack in my PostBuild event with the following command:
nuget pack "C:\Projects\MyProject.csproj" -Properties Configuration=Release -IncludeReferencedProjects -OutputDirectory ..\..\
I also tried to perform the pack from the command line and got the same error.
I am using NuGet 2.5.XXX. I am using Visual Studio 2015 SP3. My project is a WCF Service Library. I use the Post Build command in many other projects with no problem. Also, I have created other WCF services with no problem.
I suppose I should upgrade NuGet, but am slightly afraid it may break something else.