{"action":"created","issue":{"url":"https://api.github.com/repos/NuGet/Home/issues/1514","labels_url":"https://api.github.com/repos/NuGet/Home/issues/1514/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/Home/issues/1514/comments","events_url":"https://api.github.com/repos/NuGet/Home/issues/1514/events","html_url":"https://github.com/NuGet/Home/issues/1514","id":109677308,"number":1514,"title":"NuGet still fails to pack PCL libraries","user":{"login":"StevenLiekens","id":1583241,"avatar_url":"https://avatars.githubusercontent.com/u/1583241?v=3","gravatar_id":"","url":"https://api.github.com/users/StevenLiekens","html_url":"https://github.com/StevenLiekens","followers_url":"https://api.github.com/users/StevenLiekens/followers","following_url":"https://api.github.com/users/StevenLiekens/following{/other_user}","gists_url":"https://api.github.com/users/StevenLiekens/gists{/gist_id}","starred_url":"https://api.github.com/users/StevenLiekens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevenLiekens/subscriptions","organizations_url":"https://api.github.com/users/StevenLiekens/orgs","repos_url":"https://api.github.com/users/StevenLiekens/repos","events_url":"https://api.github.com/users/StevenLiekens/events{/privacy}","received_events_url":"https://api.github.com/users/StevenLiekens/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NuGet/Home/labels/2%20-%20Working","name":"2 - Working","color":"CCCCCC"},{"url":"https://api.github.com/repos/NuGet/Home/labels/Type:Bug","name":"Type:Bug","color":"207de5"}],"state":"closed","locked":false,"assignee":{"login":"zhili1208","id":7131513,"avatar_url":"https://avatars.githubusercontent.com/u/7131513?v=3","gravatar_id":"","url":"https://api.github.com/users/zhili1208","html_url":"https://github.com/zhili1208","followers_url":"https://api.github.com/users/zhili1208/followers","following_url":"https://api.github.com/users/zhili1208/following{/other_user}","gists_url":"https://api.github.com/users/zhili1208/gists{/gist_id}","starred_url":"https://api.github.com/users/zhili1208/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhili1208/subscriptions","organizations_url":"https://api.github.com/users/zhili1208/orgs","repos_url":"https://api.github.com/users/zhili1208/repos","events_url":"https://api.github.com/users/zhili1208/events{/privacy}","received_events_url":"https://api.github.com/users/zhili1208/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/NuGet/Home/milestones/11","html_url":"https://github.com/NuGet/Home/milestones/3.3.0-Beta","labels_url":"https://api.github.com/repos/NuGet/Home/milestones/11/labels","id":1057211,"number":11,"title":"3.3.0-Beta","description":"The first major update for NuGet extension targeted to around Visual Studio Update I timeframe.\r\n\r\nThis release includes bug fixes, new features, and UI refresh for NuGet.\r\n\r\nDate is tentative","creator":{"login":"yishaigalatzer","id":1238711,"avatar_url":"https://avatars.githubusercontent.com/u/1238711?v=3","gravatar_id":"","url":"https://api.github.com/users/yishaigalatzer","html_url":"https://github.com/yishaigalatzer","followers_url":"https://api.github.com/users/yishaigalatzer/followers","following_url":"https://api.github.com/users/yishaigalatzer/following{/other_user}","gists_url":"https://api.github.com/users/yishaigalatzer/gists{/gist_id}","starred_url":"https://api.github.com/users/yishaigalatzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yishaigalatzer/subscriptions","organizations_url":"https://api.github.com/users/yishaigalatzer/orgs","repos_url":"https://api.github.com/users/yishaigalatzer/repos","events_url":"https://api.github.com/users/yishaigalatzer/events{/privacy}","received_events_url":"https://api.github.com/users/yishaigalatzer/received_events","type":"User","site_admin":false},"open_issues":296,"closed_issues":42,"state":"open","created_at":"2015-04-07T20:54:03Z","updated_at":"2015-10-14T17:23:08Z","due_on":"2015-11-16T08:00:00Z","closed_at":null},"comments":8,"created_at":"2015-10-04T12:11:14Z","updated_at":"2015-10-14T17:23:08Z","closed_at":"2015-10-14T17:23:08Z","body":"Relates to: https://nuget.codeplex.com/workitem/4013\r\nRelates to: #1106\r\n\r\nThe above issues were closed without a fix, so I'm opening a new one. Third time's the charm, right?\r\n\r\n# tldr; nuget 2.8.8 and 3.2.0 use a broken version of AssemblyMetadataExtractor\r\n\r\n##### The Scenario\r\nPCL profile 151 (.NET 4.5.1, Windows 8.1, Windows Phone 8.1)\r\n```\r\n└───src\r\n    │   MyPortableLib.sln\r\n    │\r\n    └───MyPortableLib\r\n            MyPortableLib.csproj\r\n            MyPortableLib.nuspec\r\n```\r\n##### The Command\r\n```\r\nnuget.exe pack src\\MyPortableLib\\MyPortableLib.csproj  /verbosity detailed\r\n```\r\n##### The Error\r\n```C#\r\nWARNING: Unable to extract metadata from 'MyPortableLib.dll'.\r\nWARNING: 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.\r\nFile 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.\r\nFile name: 'System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'\r\n   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)\r\n   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)\r\n   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)\r\n   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)\r\n   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)\r\n   at System.Reflection.Assembly.ReflectionOnlyLoad(String assemblyString)\r\n   at NuGet.AssemblyMetadataExtractor.MetadataExtractor.AssemblyResolver.ReflectionOnlyAssemblyResolve(Object sender, ResolveEventArgs args)\r\n   at System.AppDomain.OnReflectionOnlyAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)\r\n\r\nWRN: Assembly binding logging is turned OFF.\r\nTo enable assembly bind failure logging, set the registry value [HKLM\\Software\\Microsoft\\Fusion!EnableLog] (DWORD) to 1.\r\nNote: There is some performance penalty associated with assembly bind failure logging.\r\nTo turn this feature off, remove the registry value [HKLM\\Software\\Microsoft\\Fusion!EnableLog].\r\n\r\n   at System.ModuleHandle.ResolveMethod(RuntimeModule module, Int32 methodToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount)\r\n   at System.ModuleHandle.ResolveMethodHandleInternalCore(RuntimeModule module, Int32 methodToken, IntPtr[] typeInstantiationContext, Int32 typeInstCount, IntPtr[] methodInstantiationContext, Int32 methodInstCount)\r\n   at System.ModuleHandle.ResolveMethodHandleInternal(RuntimeModule module, Int32 methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)\r\n   at System.Reflection.CustomAttributeData..ctor(RuntimeModule scope, CustomAttributeRecord caRecord)\r\n   at System.Reflection.CustomAttributeData.GetCustomAttributes(RuntimeModule module, Int32 tkTarget)\r\n   at System.Reflection.CustomAttributeData.GetCustomAttributesInternal(RuntimeAssembly target)\r\n   at System.Reflection.RuntimeAssembly.GetCustomAttributesData()\r\n   at System.Reflection.CustomAttributeData.GetCustomAttributes(Assembly target)\r\n   at NuGet.AssemblyMetadataExtractor.MetadataExtractor.GetMetadata(String path)\r\n   at NuGet.AssemblyMetadataExtractor.MetadataExtractor.GetMetadata(String path)\r\n   at NuGet.AssemblyMetadataExtractor.GetMetadata(String assemblyPath)\r\n   at NuGet.AssemblyMetadataExtractor.ExtractMetadata(PackageBuilder builder, String assemblyPath)\r\n   at NuGet.Commands.ProjectFactory.CreateBuilder(String basePath)\r\n```\r\n\r\n##### The Solution\r\n\r\nThere is a pull request that fixes this bug that has been sitting in limbo since <strong style=\"font-size:200%;\">2014</strong>.\r\n\r\nhttps://nuget.codeplex.com/SourceControl/network/forks/StephenCleary/Issue4013/changeset/2803f4895ea678d0b0cfbb5a5e2961ec0dec40f7\r\n\r\nThis PR has been merged into the master branch, but it was never built and released.  That means that the latest NuGet.Core 2.8.8 package still has the bug, and that **both nuget 2.8.8 and 3.2.0 use a broken version of AssemblyMetadataExtractor**."},"comment":{"url":"https://api.github.com/repos/NuGet/Home/issues/comments/148124725","html_url":"https://github.com/NuGet/Home/issues/1514#issuecomment-148124725","issue_url":"https://api.github.com/repos/NuGet/Home/issues/1514","id":148124725,"user":{"login":"zhili1208","id":7131513,"avatar_url":"https://avatars.githubusercontent.com/u/7131513?v=3","gravatar_id":"","url":"https://api.github.com/users/zhili1208","html_url":"https://github.com/zhili1208","followers_url":"https://api.github.com/users/zhili1208/followers","following_url":"https://api.github.com/users/zhili1208/following{/other_user}","gists_url":"https://api.github.com/users/zhili1208/gists{/gist_id}","starred_url":"https://api.github.com/users/zhili1208/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhili1208/subscriptions","organizations_url":"https://api.github.com/users/zhili1208/orgs","repos_url":"https://api.github.com/users/zhili1208/repos","events_url":"https://api.github.com/users/zhili1208/events{/privacy}","received_events_url":"https://api.github.com/users/zhili1208/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T17:23:08Z","updated_at":"2015-10-14T17:23:08Z","body":"merged to 2.10"}}