Hi,
I switched from just coding in the whole protocol xml to creating a solution based on the protocol in Visual Studio and do my changes in the QActions and protocol.xml. Running the validation shows no compile errors. But when I published a new version of the protocol, it leads to some dependency problems because of missing methods and packages, e.g. "The type or namespace name 'Core' does not exist in the namespace 'Skyline.DataMiner'". Then I had to add to some QActions the missing NuGet packages.
QAction_1 already includes the Skyline Core package, so I thought every QAction which has a dependency to QAction_1 also includes their dependencies? Or does any QAction need to add the used packages by their own?
I have to include Core package also in QAction_2. otherwise I get the above exception.
Is that correct or do I have to change anything in VS or in Dataminer?
Thanks,
David
Hi José,
yes, thanks! How about you?
I publish it directly from Visual Studio.
Kind regards,
David
Hi David,
DataMiner indeed requires that the packages are added to the child projects as well.
The fact that Visual Studio doesn't show an error when that is not the case, could be misleading. To avoid this you can set the "Private Assets" property to "all" on the packages in QAction_1. This causes that the dependencies don't propagate to the child projects anymore.
DIS now uses by default the SDK-style project format for its projects (csproj). In SDK-style projects, when you add a project reference all NuGet package references from the referenced project will be automatically included in the referencing project (transitive package references). The current behavior in DIS is because originally DIS used the legacy-style project format where this behavior is not present.
As Tom points out, if you want to prevent this transitive behavior, you can mark it as a private asset.
I created a task to investigate whether the same logic can be applied in DIS.
Thanks for feedback.
Actually I want the transitive behavior.
How can I switch to the SDK-style? I have created a solution based on the imported protocol, did not choose which style I want for the project.
DIS will now always use SDK-style when creating a new connector solution (So there is no option in DIS to specify which type to use. DIS still supports solutions that have legacy-style projects. This is to avoid having to convert older solutions to use the new project format).
However, DIS currently does not take into account the fact that, in SDK-style projects, NuGet packages of a referenced project should are also available in the referencing project (when not marked as private assets). To look into this, I created that task.
Okay now I get it. Thanks!
Hi David,
I hope you're doing well! Could you let me know how the publishing of the new connector version is being handled?
Kind regards,