Hi,
I noticed that when using nuget packages on a protocol solution, DIS writes the dll import references wrong on some instances (on those packages that have version numbers on package name in my understanding).
For example for package with name and content paths Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\... the import reference on solution xml is written as Microsoft.Bcl.AsyncInterfaces\5.0.0\lib\...
If I Fix these paths manually, dll's get loaded correctly and everything works fine.
Is this how it’s supposed to work, or is it a bug?
I also would like to know that is there a way to prefix dll import path for all nuget dll imports on a solution automatically? For example if I create a folder ..\Skyline Dataminer\ProtocolScripts\DllImport\MyProtocol and put all the solution specific packages in there, the import paths would be like dllImport="mySolution\my.special.nuget.package...
Thanks in advance,
Juho
Hi Juho,
This is by design: When using packages.config, the "packages" folder in the solution indeed contains subdirectories containing both the name and version of the NuGet package. However, the global packages folder (by default found under %userprofile%\.nuget\packages) follows another structure where for each package there is a parent folder with only the name of the pacakge. That folder then contains a subfolder per version of the NuGet package.
DataMiner follows the latter foldering structure. Therefore, if you copy over the folders manually, it's best to take those from the global packages folder.
Note that we have a DIS task in our backlog to publish the DLLs on DataMiner automatically so this would become transparent to the user.
Currently there is no support for automatically including a solution/protocol specific prefix. The rationale behind this is that a NuGet package could be used by many different protocols and if we would introduce a folder per protocol, we might end up with many duplicate NuGet DLLs.
Thanks for great answer Pedro, indeed I got mixed with local and global packages here 🙂