Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
Dmiitry
71 discussion posts
Change log for version 5.0 says:
"Change: You can now add your own assemblies to ClipboardFusion Macros"

Can you please elaborate on this feature? Where my own assembly's DLL file should be placed? Along with ClipboardFusion binaries or in the GAC?
• Attachment: ClipboardFusion_Own_Assemblies.png [181,224 bytes]
ClipboardFusion_Own_Assemblies.png
ClipboardFusion_Own_Assemblies.png
Oct 19, 2017  • #1
Thomas Malloch (BFS)'s profile on WallpaperFusion.com
Your assemblies can be anywhere you like. All you need to do is add the path to them in the "References" text box in the Macro Editor, and make sure your assemblies are compiled with the same version of the .NET framework (4.6).

I've attached a screenshot showing a Macro that I use with an external assembly.

I hope this helps!
• Attachment: macroeditor-references.png [34,209 bytes]
macroeditor-references.png
macroeditor-references.png
Oct 19, 2017  • #2
User Image
Dmiitry
71 discussion posts
Thank you, Thomas. Good example in your screenshot!
Oct 19, 2017  • #3
User Image
Dmiitry
71 discussion posts
Hi Thomas

By the way, your screenshot says you link Newtonsoft.Json.dll version 4.5 (and anyway no 4.6 version exists for that library in the download). So, is it OK to have 4.5 library and not necessarily 4.6 as you have suggested? Or you had to re-build Newtonsoft library from source to satisfy 4.6 requirement?

Thanks,
Dmitry
Oct 23, 2017  • #4
Thomas Malloch (BFS)'s profile on WallpaperFusion.com
The way I usually test it is to add the DLL to the references and compile to see if it throws an error. The error usually looks something like this if the assembly is using the wrong .NET framework:

"an attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed"

You can try a different version of the DLL, or you can right click on the file itself, click "Properties" and unblock the file. More details here:

https://stackoverflow.com/questions/15238714/net-local-assembly-load-failed-with-cas-policy
Oct 30, 2017 (modified Oct 30, 2017)  • #5
User Image
Dmiitry
71 discussion posts
Thank you, Thomas!

Very helpful instruction, this "assembly to be sandboxed" error is indeed confusing and I used to get it sometimes, outside of CF macros
Oct 30, 2017  • #6
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)