Hello,
My question is regarding the .dmprotocol package and references an earlier post: https://community.dataminer.services/question/is-there-any-documentation-explaining-how-we-can-create-dmprotocol-package/
Where is the required <assemblyFilePath> located in the solution folder?
*************
var protocolBuilder = new AppPackageProtocol.AppPackageProtocolBuilder("<name>", "<version>", "<protocolXmlFilePath"))
.WithAssembly("<assemblyFilePath>", "<destinationFolder>");
*************
I have tried using the QAction_Helper.dll and was able to create a .dmprotocol package file, however it only contained the xml information (i.e. parameters, triggers, groups, timers, etc) but no C# code in the QActions nor any other references.
Hi Pawel
With Protocol as a Solution, the XML doesn't contain the C# code directly anymore. These are now in the QAction projects. You'll first need to extract the C# code, insert it in the XML and then continue with the package creation.
The method 'WithAssembly' is for custom DLLs or NuGet packages that are being used (Excluding the Skyline.DataMiner.Dev.*) and that need to be part of the dmprotocol. The QAction_Helper is not allowed as that will be generated by DataMiner upon uploading the dmprotocol package.
For Automation scripts we already have a nice easy method that does all that for you (Skyline.DataMiner.CICD.DMApp.Automation), but we don't have that available yet for protocols. This is currently on our backlog, which I'll check if it can be prioritized.
Hi Michiel,
In the meantime, I built this class library (.dll), which provides methods for inserting the C# code into the protocol.xml without making changes to the solution folder.
In the meantime we have developed a NuGet package where it can build a dmprotocol package based on a connector solution: https://www.nuget.org/packages/Skyline.DataMiner.CICD.DMProtocol
You can use this very simply with this line:
var package = await ProtocolPackageCreator.Factory.FromRepositoryAsync(new LogCollector(), solutionDirectory);
Thanks Michiel. I will keep an eye out for it.