Jump to content

How to handle Plastic lib dependencies when building a custom issue tracker extension


Xarbrough

Recommended Posts

I've previously built a custom extension for the standard GUI. It's a .NET library project which references not only the issuetrackerinterface.dll, but also log4.net.dll and utils.dll because they also contain code which I depend on. When I deploy the extension, I only copy my single plugin dll to the extensions directory, because Plastic automatically loads the additional libraries. Not sure if this is the best way to handle things, but it used to work correctly with the old GUI.

In the new beta GUI, my extension loads correctly (even though it can't yet be configured in the preferences), but it throws runtime errors indicating that certain assemblies couldn't be loaded. For example: "utils" or "System.Web".

The first is actually part of the PlasticSCM client folder, so I wonder why it's not loaded. The second is part of .NET, but I'm not sure why it's automatically present when using the old GUI but not loaded with the new one.

Is there a better approach to handling these dependencies for me? Or will PlasticX add the missing assemblies in the future?

Of course it seems like I could simply copy paste all of my dependencies into the extensions folder, but I'm afraid this may cause conflicts in the future, when Plastic evolves and might upgrade things like the utils library or log4.net, but again, not sure what the best approach might be.

 

image.png.e3307daca3bf0518c8733357b94836b4.pngimage.png.2ef7dab6d592c9af78daa1b246843c84.png

 

Link to comment
Share on other sites

  • 2 weeks later...

Hi @Xarbrough,

Let me explain the changes done for the issue trackers in the latest releases:
* We modified the issuetrackerinterface library to remove the utils dependency.
* PlasticX is a single file application in net-core that includes the dependencies in the bundle itself.

Regarding your issue, I think that if you use the last issuetrackerinterface, the utils dependency is not needed. For the third-party dependencies used by your custom extension, you are right, you need to copy/paste them into the extensions folder. e.g: log4.net

Let me know if this solves the issues you had.

Best regards,
Míryam

  • Like 1
Link to comment
Share on other sites

5 hours ago, miryamgsm said:

Let me know if this solves the issues you had.

Yes, my issues are solved, thank you!

One thing I discovered earlier was that some parts of System.Web were not found when I used .NET target framework 4.7, but I simply downgraded to 4.0 and replaced the dependencies to make it compatible with PlasticX. I assume Plastic doesn't promise any specific environment other than the oldest .NET 2.0 (because only that one is mentioned in the documentation), but it looks like .NET 4.0 is fully supported by the old and new clients.

Link to comment
Share on other sites

×
×
  • Create New...