{"action":"closed","issue":{"url":"https://api.github.com/repos/fsprojects/Paket/issues/703","labels_url":"https://api.github.com/repos/fsprojects/Paket/issues/703/labels{/name}","comments_url":"https://api.github.com/repos/fsprojects/Paket/issues/703/comments","events_url":"https://api.github.com/repos/fsprojects/Paket/issues/703/events","html_url":"https://github.com/fsprojects/Paket/issues/703","id":62088603,"number":703,"title":"Wrong version binding redirect is generated when referencing a PCL dependency that uses System.Xml.Linq","user":{"login":"reijerh","id":136743,"avatar_url":"https://avatars.githubusercontent.com/u/136743?v=3","gravatar_id":"","url":"https://api.github.com/users/reijerh","html_url":"https://github.com/reijerh","followers_url":"https://api.github.com/users/reijerh/followers","following_url":"https://api.github.com/users/reijerh/following{/other_user}","gists_url":"https://api.github.com/users/reijerh/gists{/gist_id}","starred_url":"https://api.github.com/users/reijerh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reijerh/subscriptions","organizations_url":"https://api.github.com/users/reijerh/orgs","repos_url":"https://api.github.com/users/reijerh/repos","events_url":"https://api.github.com/users/reijerh/events{/privacy}","received_events_url":"https://api.github.com/users/reijerh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-16T13:54:41Z","updated_at":"2015-09-21T07:38:22Z","closed_at":"2015-09-21T07:38:22Z","body":"**To reproduce:**\r\nCreate a .NET 4.5 (WPF?) project with:\r\n\r\n_paket.dependencies:_\r\n```\r\nredirects: on\r\nframework: net45\r\nsource https://www.nuget.org/api/v2\r\n```\r\n_paket.references:_\r\n`FluentAssertions`\r\n\r\nThis will result in _app.config_ binding redirects:\r\n```\r\n<assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">\r\n  <dependentAssembly>\r\n    <assemblyIdentity name=\"FluentAssertions.Core\" publicKeyToken=\"33f2691a05b67b6a\" culture=\"neutral\" />\r\n    <bindingRedirect oldVersion=\"0.0.0.0-3.3.0.0\" newVersion=\"3.3.0.0\" />\r\n  </dependentAssembly>\r\n  <dependentAssembly>\r\n    <assemblyIdentity name=\"FluentAssertions\" publicKeyToken=\"33f2691a05b67b6a\" culture=\"neutral\" />\r\n    <bindingRedirect oldVersion=\"0.0.0.0-3.3.0.0\" newVersion=\"3.3.0.0\" />\r\n  </dependentAssembly>\r\n  <dependentAssembly>\r\n    <assemblyIdentity name=\"Microsoft.CSharp\" publicKeyToken=\"31bf3856ad364e35\" culture=\"neutral\" />\r\n    <bindingRedirect oldVersion=\"0.0.0.0-5.0.5.0\" newVersion=\"5.0.5.0\" />\r\n  </dependentAssembly>\r\n  <dependentAssembly>\r\n    <assemblyIdentity name=\"Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight\" publicKeyToken=\"31bf3856ad364e35\" culture=\"neutral\" />\r\n    <bindingRedirect oldVersion=\"0.0.0.0-2.0.5.0\" newVersion=\"2.0.5.0\" />\r\n  </dependentAssembly>\r\n  <dependentAssembly>\r\n    <assemblyIdentity name=\"System.Xml.Linq\" publicKeyToken=\"31bf3856ad364e35\" culture=\"neutral\" />\r\n    <bindingRedirect oldVersion=\"0.0.0.0-5.0.5.0\" newVersion=\"5.0.5.0\" />\r\n  </dependentAssembly>\r\n</assemblyBinding>\r\n```\r\n\r\n**The problem is that for _Microsoft.CSharp_ and _System.Xml.Linq_ it redirects to _5.0.5.0_, while it should redirect to _4.0.0.0_. The 5.0 versions seem to be Silverlight versions according to Google.** It also probably shouldn't add a redirect for _Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight_ at all.\r\n\r\nWhen you now add another package that references an older version of these DLLs, e.g. _Kent.Boogaart.Converters_, the application will crash with an exception like:\r\n```\r\n{System.TypeInitializationException: The type initializer for 'Kent.Boogaart.HelperTrinity.ExceptionHelper' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Xml.Linq, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Xml.Linq, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Retargetable=Yes' or one of its dependencies. The system cannot find the file specified.\r\n   --- End of inner exception stack trace ---\r\n   at Kent.Boogaart.HelperTrinity.ExceptionHelper..cctor()\r\n   --- End of inner exception stack trace ---\r\n   at Kent.Boogaart.HelperTrinity.ExceptionHelper..ctor(Type forType)\r\n   at Kent.Boogaart.Converters.ExpressionConverter..cctor()}\r\n```\r\n\r\n\r\nJust FYI, this is in _FluentAssertions.nuspec_:\r\n```\r\n<frameworkAssemblies>\r\n  <frameworkAssembly assemblyName=\"System.Xml\" targetFramework=\"\" />\r\n  <frameworkAssembly assemblyName=\"System.Xml.Linq\" targetFramework=\"\" />\r\n</frameworkAssemblies>\r\n```"}}