CPM .NET SDK Could not load file or assembly error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

CPM .NET SDK Could not load file or assembly error

L1 Bithead

I try to use the CPM .NET SDK (Credentials Management .NET SDK | CyberArk Docs).

 

I can build the .dll without any changes to the .cs files. The only thing I have changed is the <TargetFrameworkVersion> to v4.8 from 4.5.2 since it is v4.8 which will be used.

 

But when I execute the plugin

 

.\CANetPluginInvoker.exe '{relativ_path}\Parameters File\user.ini' verifypass '.\CyberArk.Extensions.Plugin.Template\bin\Debug\CyberArk.Extensions.Plugin.Template.dll' True

 

I get the following error:

Execution error. EXT01 :: Got exception : Could not load file or assembly '.\\CyberArk.Extensions.Plugin.Template\\bin\\Debug\\CyberArk-Extensions.Plugin.Template' or one of its dependencies. The given assembly name or codebase was invalid. (Eception from HRESULT: 0x80131047). Error code -1

 

Does anybody have an idea or face the same issue?

3 REPLIES 3

L7 Applicator

Hi @Maximilian Rosenberg​ 

 

Please try running CANetPluginInvoker.exe with elevated privileges, as some assemblies may need administrative rights to load correctly, depending on security settings.

 

 

L4 Transporter

Hi @Maximilian Rosenberg​ 

 

As it seems Malhar provided an answer for your question, could you kindly share if this solution resolved your issue?

If so, could you please mark the answer as "Select as Best" to help other community members?

 

If the issue is still relevant, I would advise raising a ticket with our Support team for further assistance.

 

Thank you, Liad

Not sure if you need to have admin privileges but I would recommend @Maximilian Rosenberg​ to add a launchSettings.json in Properties folder. (That is if you are using Visual Studio to develop your plugins.

 

And below should be the content of that file:

 

{ "profiles": { "Verify Action": { "commandName": "Executable", "executablePath": "C:\\Users\\<USER>\\source\\repos\\<PROJECT>\\bin\\x86\\Debug\\net48\\CANetPluginInvoker.exe", "commandLineArgs": ".\\user.ini verifypass .\\<YOUR_PLUGIN>.dll true", "workingDirectory": "C:\\Users\\<USER>\\source\\repos\\<PROJECT>\\bin\\x86\\Debug\\net48", "nativeDebugging": true }, "Change Action": { "commandName": "Executable", "executablePath": "C:\\Users\\<USER>\\source\\repos\\<PROJECT>\\bin\\x86\\Debug\\net48\\CANetPluginInvoker.exe", "commandLineArgs": ".\\user.ini changepass .\\<YOUR_PLUGIN>.dll true", "workingDirectory": "C:\\Users\\<USER>\\source\\repos\\<PROJECT>\\bin\\x86\\Debug\\net48", "nativeDebugging": true }, "Reconcile Action": { "commandName": "Executable", "executablePath": "C:\\Users\\<USER>\\source\\repos\\<PROJECT>\\bin\\x86\\Debug\\net48\\CANetPluginInvoker.exe", "commandLineArgs": ".\\user.ini reconcilepass .\\<YOUR_PLUGIN>.dll true", "workingDirectory": "C:\\Users\\<USER>\\source\\repos\\<PROJECT>\\bin\\x86\\Debug\\net48", "nativeDebugging": true }, "PreReconcile Action": { "commandName": "Executable", "executablePath": "C:\\Users\\<USER>\\source\\repos\\<PROJECT>\\bin\\x86\\Debug\\net48\\CANetPluginInvoker.exe", "commandLineArgs": ".\\user.ini prereconcilepass .\\<YOUR_PLUGIN>.dll true", "workingDirectory": "C:\\Users\\<USER>\\source\\repos\\<PROJECT>\\bin\\x86\\Debug\\net48", "nativeDebugging": true } } }

Above will allow you to perform different actions, straight from Visual Studio code.

 

imageHope that helps.

  • 294 Views
  • 3 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!