1
votes

Steps so far:

  • Downloaded Reg Tool from MS
  • Built
  • Deployed on to CRM App Server (Win2k8 machine)
  • Loaded and signed in with Deployment Admin account
  • Add New Assembly
  • Browse to plugin library
  • Press Open
  • Error!

    Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\crmtools\PluginRegTool\PluginRegTool_1708_New_From_SDK\PluginRegistration.exe' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

The inner exception says:

System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. 
This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. 
If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.

The plugin library I am loading is sitting on the same box as the PluginRegTool (the CRM App server as I said before). The regtool is under a folder on the c:\ drive and plugin library is sat under \\server\bin\assembly

Pulling my hair out with this one, must have done this 100 times before!

Any help much appreciated.

1

1 Answers

5
votes

Sorted it

  • Right click the plugin registration tool exe file
  • Click properties
  • File has been 'blocked' - right click and press 'unblock'

Et voila!

One less stressed CRM developer!

Hope this helps someone else.

edit: worth saying that this happened again and it was the actual plugin library this time. It seems to be around transferring files from other machines causes this issue. If anyone has a more detailed explanation as to the cause, I'd love to get more information around this.