brentkrueger / VisualStudio2015PackageVisualizer

Implementation of the Visual Studio 2013 package visualizer as a Visual Studio 2015 extension. Version for VS 2017 can be found here: https://github.com/brentkrueger/VisualStudio2017PackageVisualizer
MIT License
13 stars 3 forks source link

"Sequence contains no matching element" #5

Open jnyrup opened 7 years ago

jnyrup commented 7 years ago

When trying to run the Package Visualizer against my solution I got a dialog with "Sequence contains no matching element exception",

I tracked it down to var projectPackage = project.Packages.First(k => k.Name.StartsWith(dependency.Id, StringComparison.InvariantCultureIgnoreCase)); https://github.com/brentkrueger/VisualStudio2015PackageVisualizer/blob/6d8fa796c27cc18c1aee0cebb55e6a9b2f85413a/PackageVisualizer/NugetPackageVisualizer.cs#L289

The package that couldn't be found was "Microsoft.WindowsAzure.ConfigurationManager.3.1.0". It is in the packages directory and in the packages.config of the project. It wasn't in the Packages property.

The Packages only contained log4net. I tried logging all packages found during the call to LoadPackageConfigs() and log4net for the very same project, was the last package to be found, even though I think more projects and packages should have been found.

If it is any help packages.config:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="log4net" version="2.0.4" targetFramework="net451" />
  <package id="logentries.core" version="2.8.0" targetFramework="net451" />
  <package id="logentries.log4net" version="2.8.0" targetFramework="net451" />
  <package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.1.0" targetFramework="net451" />
  <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net451" />
</packages>