1

Closed

calling IPackage.Dependencies in IPackageCommand.Execute causes plug-in to crash

description

attached a screenshot with the following error message:

"The command failed with this error message:

Method not found:
'System.Collections.Generic.IEnumerable'1<NuGet.PackageDependency> NuGet.IPackageMetadata.get_Dependencies()'."

file attachments

Closed Jan 20 at 3:27 AM by dotnetjunky

comments

XavierDecoster wrote Sep 12, 2013 at 7:35 PM

Some additional info:
I reference NuGetPackageExplorer.Types v3.0.0 and use the latest version of NuGet Package Explorer, which is v3.6.0.3.

Looking at the sources here for the types, I see a different implementation of IPackageMetadata.
Is it possible that there's currently no NuGetPackageExplorer.Types package compatible with the latest version?

dotnetjunky wrote Sep 12, 2013 at 7:49 PM

probably.

dotnetjunky wrote Sep 12, 2013 at 7:49 PM

I'll release a new version of NuGetPackageExplorer.Types soon

XavierDecoster wrote Sep 18, 2013 at 1:32 PM

Cool, looking forward to it :)

dotnetjunky wrote Sep 23, 2013 at 5:01 PM

I've just uploaded v4.0 of the package. Please try it and let me know. Note that it now requires .NET 4.5 project.

XavierDecoster wrote Sep 23, 2013 at 5:19 PM

Already trying :)

Q: plugin project needs to target net45, but should still reside in lib\net40 folder?

XavierDecoster wrote Sep 23, 2013 at 6:05 PM

It fixed this issue, so I guess you can close it.

XavierDecoster wrote Sep 23, 2013 at 8:22 PM

Hmm... Is it possible the DependencySets property is empty when passing in the IPackage to the IPackageCommand.Execute method?

Tested with EF package (which has dependencies), which had an empty DependencySets property value.

dotnetjunky wrote Nov 10, 2013 at 8:29 PM

Do you still have issue with this? If yes, can you share a repro step the plugin?

XavierDecoster wrote Nov 13, 2013 at 12:13 PM

Nope, you can close the issue. Thx!