Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

FakeXrmEasy.365 has a missing dependency to Microsoft.CrmSdk.Extensions when .InitializeMetadata(Type) is used. #523

Open
2 tasks
jordimontana82 opened this issue Oct 5, 2020 · 4 comments
Labels

Comments

@jordimontana82
Copy link
Owner

jordimontana82 commented Oct 5, 2020

It seems that when using latest version of FakeXrmEasy.365 and using the above method to init metadata from early bound types, it's complaining about this missing reference probably because type is still in use, although deprecated now.

That class exists in the (now deprecated) is in Xrm.Client namespace which seems to exist in the Microsoft.CrmSdk.Extensions package.

I think it would be better to include that package dependency in the .nuspec file but with a view of getting rid of it eventually...

Also:

  • When generating option sets, the OptionSet property generated is null, we could generate a dummy one, that can be then overriden if needed
  • Similarly for the Targets property when generating Lookups. It's null. We could generate it as an array with a single dummy value as the target.

Thoughts ? @BetimBeja

imagen

@BetimBeja
Copy link
Contributor

Perhaps we could track usage in the package and change the condition to

#if FAKE_XRM_EASY || FAKE_XRM_EASY_2013 || FAKE_XRM_EASY_2015

and drop those parts of the code from the crm >=v. 8

The package Microsoft.CrmSdk.Extensions seems "abbandoned" to version 7.1.0.1

@jordimontana82
Copy link
Owner Author

Yep, sounds good

@BetimBeja
Copy link
Contributor

I have done some quick check of uses of the Xrm.Client namespace and the only required change is the line you specified here.
The other references are being correctly handled with the proposed solution
image

@jordimontana82
Copy link
Owner Author

Grand, I've found a few other bits that might be interesting in metadata generation from early bound types, I'll add them to the issue description

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants