Hi,
I'm looking at using compiling a C# code block as a library to simplify some of our scripts, as we have several methods that are duplicated over a lot of them, everything works as explained in Compiling a CSharp code block as a library until I get to the script reference part, once uploaded the reference shows as "C:\Skyline DataMiner\ProtocolScripts\" instead of "C:\Skyline DataMiner\Scripts\Libraries\".
Manually editing the path to the correct one resolves the issue, but I don't want to have to do that every time I upload a change; I can use a ref parameter directly to it, but then that's linked directly to a specific version, which might cause issues down the line.
Also testing edits on the library I see a new version is created each time with a new date in "C:\Skyline DataMiner\Scripts\Libraries\", but then I need to update the reference in my project to use the new version, which does make sense for version compatibility, but I then end up with different version of the dll between our dev and production systems unless I copy one of the files from one to the other and replicate it.
Hi Philip,
Are you referring to the shared library project in the VS solution? (Instead of browsing the DLL file where you have that shared code):
Adding the reference will prevent errors during the compilation at VS, but you also need to set the <Param type="scriptRef"> tag in the XML of the automation using that shared library so that when the automation is loaded, DataMiner will automatically resolve a valid reference to the shared code without having to specify any path to a file.
Hi Gelber,
See my comment/answer below.