Menu

New plugin creation - how to specify custom assembly reference?

John11
2017-01-24
2017-01-24
  • John11

    John11 - 2017-01-24

    I have created a new plugin, it works as .dll but I am having a problem packaging it into a .plgx because it uses a .dll in another project, and apparently the .plgx build doesn't like this. The development page says "reorganize your project to use custom assembly references instead". How does one do this?
    I have tried re-structuring by putting the ref'd project as a sub-project under the calling project and creating a standard reference to it (in VS2015), but the reference is not working at run-time as the actual path is used, rather than the one to the temp directory.
    How should I reference the sub-project correctly?

    TIA
    John

     
  • Dominik Reichl

    Dominik Reichl - 2017-01-24

    Referencing other projects directly isn't supported for PLGX files.

    However, you can compile the other project to a DLL file, copy the DLL file into your main project's folder and add a reference to the DLL.

    Best regards,
    Dominik

     
  • David Lechner

    David Lechner - 2017-01-24

    I made a plgx tool that can handle this sort of thing. It is availible on nuget. A .csproj that uses it is here.

     
  • John11

    John11 - 2017-01-24

    Thanks to both for your replies. I'll give that plgx tool a look, David.
    John

     
  • John11

    John11 - 2017-01-29

    I found out that the reason I could not build the .plgx when using a copy of the other .DLL in the project main directory was because I had some C# v6 constructs (exception filters) while the Keepass plgx compiler tool only goes up to C# v5.

    I also had success with David's alternative tool.

     

Log in to post a comment.