I'm new to Nuget and I'm trying to create a NuGet package for a Portable Class Library project that has a package dependency on another portable class library I've created.
I'm running into an issue where I'm receiving an error when calling nuget pack for the project file TestComponent2.csproj (I created this from the Portable for Universal Apps template in VS 2013). This library has a dependency on a nuget package created from another PCL called TestComponent1.
The package created never seems to contain this dependency (the console output even says "Dependencies: None"). However it is in the packages.config file for the TestComponent2 project the dependency is definitely listed:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="TestComponent1" version="1.0" targetFramework="portable-win81+wpa81" />
</packages>
So in my situation I'm calling the following from the command line for a project called TestComponent2, from the folder containing the TestComponent2.csproj and packages.config, with verbosity turned on:
> nuget pack TestComponent2.csproj -Verbosity Detailed
WARNING: Unable to extract metadata from 'TestComponent2.dll'. WARNING: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, B oolean suppressSecurityChecks)
...
Add file 'mypath\TestComponent2.dll' to package as 'lib\portable-win81+wpa81\TestComponent2.dll'
Found packages.config. Using packages listed as dependencies
WARNING: Description was not specified. Using 'Description'.
WARNING: Author was not specified. Using 'myname'.
Id: TestComponent2
Version: 1.0
Authors: myname
Description: Description
Dependencies: None
Added file 'lib\portable-win81+wpa81\TestComponent2.dll'.
Successfully created package 'mypath\TestComponent2.1.0.nupkg'.
If I call nuget spec first I also get the following error: WARNING: Unable to extract metadata from 'TestComponent2.dll'. Using 'TestComponent2.nuspec' for metadata. The replacement token 'title' has no value.
Is there an issue with nuget creating packages for the new universal PCL? Or perhaps I have some configuration wrong? I'm using Nuget 2.8.