Project-system: Need to implement IExtenderCATIDProvider to enable extenders to extend our property pages

Created on 3 Aug 2017  路  10Comments  路  Source: dotnet/project-system

_From @NickCraver on August 3, 2017 0:6_

Just found a crash for VS in the logs, stack here:

Unknown exception
Exception:
The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
StackTrace:

   at EnvDTE.ObjectExtenders.GetExtenderNames(String ExtenderCATID, Object ExtendeeObject)

   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProject.get_ExtenderNames()

   at BuildVision.Helpers.ProjectExtensions.GetExtenderNames(Project project)
Source:

TargetSite:


System.Object GetExtenderNames(System.String, System.Object)
BaseException:
System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

   at EnvDTE.ObjectExtenders.GetExtenderNames(String ExtenderCATID, Object ExtendeeObject)

   at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProject.get_ExtenderNames()

   at BuildVision.Helpers.ProjectExtensions.GetExtenderNames(Project project)

Hopefully that path makes some sense - VS 2017 Preview 7 in play.

BuildVision Version: 1.4.1.61

_Copied from original issue: StefanKert/BuildVision#30_

Bug Parity-Legacy-API Resolution-Fixed

All 10 comments

Two bugs here that I can see;

1) we're not implementing IExtenderCATIDProvider - so the CATID that CPS is to ObjectExtenders.GetExtenderNames is very likely null.

~2) CPS shouldn't be calling ObjectExtenders.GetExtenderNames if there's no IExtenderCATIDProvider.~

@nickcraver - can you clarify what logs you found this in? Looks like activitylog.xml, and it didn't actually take down VS, right?

@Pilchie if I remember right this is from actitvity.log and it didn鈥榯 take down VS. This error occurred inside the BuildVision extension when trying to get the extendernames for a project. In buildvision this error is currently handled internally, so it does not show any errors to the user. If I remember right @NickCraver found this while looking for another error in activitylog..

If you need any further information on when and how this is happening let me know.

Submitted a PR internally to handle the second case - fixed CPS to not throw in this case.

We still need to implement IExtenderCATIDProvider and actually return CATIDs.

To implement IExtenderCATIDProvider - we need to figure out all the different CATIDs that legacy has for References, Configurations, Reference, Project, etc for C# and VB (what do we do about F#) and return them.

I have a PR here: https://github.com/dotnet/project-system/pull/3562 that returns CATIDs and hence implements extender support.

C# and VB now support extenders in the same way as legacy: https://github.com/dotnet/project-system/pull/3562. F# support is being tracked by https://github.com/dotnet/project-system/issues/3561.

@davkean Will this be in the next 15.8 Preview? Since the exceptions that got
mentioned in https://github.com/StefanKert/BuildVision/issues/30 will probably be fixed and I麓d love to check if it actually works or if I have to do some additional work to support this.

In will be in 15.8 Preview 3, not Preview 2 which is the next one.

Wow. 30 seconds to reply. That is awesome! Thanks for the heads up :). You folks doing great work. Really appreciate it!

Was this page helpful?
0 / 5 - 0 ratings