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

Generating json mapping file from Get-XrmPluginRegistrationFromAssembly #318

Open
pixunen opened this issue Apr 7, 2022 · 1 comment
Open

Comments

@pixunen
Copy link

pixunen commented Apr 7, 2022

Hello,

Start off I'm quite new to dynamics crm and this is work my thesis work so all the help would be much appreciated.

I'm trying to implement simple CI/CD for on-premises CRM environment and I've managed to use everything I need for this implementation from your excellent xrm-ci-framwork library. The last step is to upsert assemblys that are being developed, but I can't get the cmdlets Get-XrmPluginRegistrationClass and Get-XrmPluginRegistrationFromAssembly to work correctly.

I run the Get-XrmPluginRegistrationClass and use the default namespace it gives. I add the generated code to my project to a new file with name XrmCiPluginRegistration.cs and build the the .dll as usual. Then I run the Get-XrmPluginRegistrationFromAssembly with the correct assemblypath and a mapping.json file that has the mappings from the Get-XrmPluginRegistration already.
When running this I get an error Get-XrmPluginRegistrationFromAssembly : Sequence contains no elements and I've located this error to come from the part where ReflectionLoader.Constructors are initialized because when the code is creating the assembly types it comes out with ReflectionLoader.ClassNames = 0 even though when I debug the code it finds all my classes and the classes from the XrmCiPluginRegistration.cs.

I'm not sure if I'm doing something incorrectly or what is the problem. I need this mappingfile from the assembly so I can upsert it to the environment and update/register possible new plugins when doing it.

@pixunen
Copy link
Author

pixunen commented May 6, 2022

This issue can be closed. Was missing the attribute declarations for my classes in the project.

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

No branches or pull requests

1 participant