Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hack for Early Bound Assemblies #470

Closed
wants to merge 4 commits into from
Closed

Hack for Early Bound Assemblies #470

wants to merge 4 commits into from

Conversation

daryllabar
Copy link
Collaborator

This change will allow the CRM ToolBox To Connect, even if multiple plugins are currently loaded with ProxyTypes Enabled.

It will allow for CrmContext interactions, but only if the plugin implements IEarlyBoundProxy, and only for one plugin assembly type per instance of XrmToolBox

Known Breaking Changes introduced:

  1. If a plugin is using an OrganizationServiceContext without implementing IEarlyBoundProxy, it will fail upon attempts to interact to CRM via the OrganizationServiceContext.

Known Bugs introduced

  1. If two plugins implement IEarlyBoundProxy, and define two different assemblies with at least one type of the same logical name, when the second plugin loads, and exception will be thrown.

For some reason the SetEarlyBoundAssembly method doesn't appear to be working with this change. It isn't calling the AssemblyBasedKnownProxyTypesProvider like I think it would, which means the Microsoft.Xrm.Sdk.Client.ProxyTypesBehavior's constructor is not getting called with a proxyTypesAssembly. I've added a RegisterAssembly call to load Types at the domain level, so at least the first request of an earlybound assembly will work.

…c respository, it will only work once per instance of the XrmToolBox.

Added Simpler method for Setting the EarlyBound Assembly by just using the OrganizationServiceContext, to the BasePluginControl class
… a Static respository, it will only work once per instance of the XrmToolBox."

This reverts commit d093990.
@daryllabar
Copy link
Collaborator Author

Moving this to a different Branch

@daryllabar daryllabar closed this Oct 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant