Hi,
I'm trying to use the Skyline.DataMiner.Dev.Common nuget(v 10.4.2.6). I've added the following assemblies
using Skyline.DataMiner.Core.DataMinerSystem.Common;
using Skyline.DataMiner.Core.DataMinerSystem.Automation;
In Visual studio everything is happy with no errors but when i upload the package to my agent i get these kind or errors:
the type or namespace name does not exist in the namespace (are you missing an assembly reference )
So it seems it doesn't import the dev.common nuget correctly.
what is going on?
Edit: tested with latest version but same issue.
Hi Gerwin,
Below some clarification about the different NuGet packages:
The skyline.dataminer.dev.* NuGet packages refer to skyline.dataminer.files.* NuGet packages which contain DataMiner assemblies. These allow to create a Visual Studio solution for DataMiner projects (e.g. for connectors or Automation scripts) and compile the solution by just referencing these NuGet packages without the need to have a DataMiner installed on your dev machine.
When a package is created, e.g. in DIS, for the connector or Automation script, the package will not contain any skyline.dataminer.dev.* package assemblies as these assemblies are already available on DataMiner.
The skyline.dataminer.core.dataminersystem.* NuGet packages on the other hand represent the class library. These should be included in the created package.
When creating an Automaton script and you want to use the class library, you can install the Skyline.DataMiner.Core.DataMinerSystem.Automation NuGet. (Note that as Skyline.DataMiner.Core.DataMinerSystem.Automation has a dependency on Skyline.DataMiner.Core.DataMinerSystem.Common, you only need to install the Skyline.DataMiner.Core.DataMinerSystem.Automation in Visual Studio. The Common one will be indirectly added because it is marked as a dependency in the Automation Nuget.)
When creating a connector and you want to use the class library, you can install the Skyline.DataMiner.Core.DataMinerSystem.Protocol NuGet. (Same remark applies here, if you install the .Protocol NuGet, you indirectly install the Common NuGet as well as it is marked as a dependency in the .Protocol NuGet)
The error "he type or namespace name ‘Dev’ does not exist in the namespace ‘Skyline.DataMiner’ (are you missing an assembly reference?), seems to indicate that you might have a using statement in your code somewhere like "using Skyline.DataMiner.Dev;". Note that there is no such namespace ("Skyline.DataMiner.Dev" is just the start of the name of the NuGet packages but these do not contain types in a Skyline.DataMiner.Dev namespace. As stated, the skyline.dataminer.dev.* just refer to other packages that contain DataMiner assemblies. For example, the skyline.dataminer.dev.protocol package has a dependency on the Skyline.DataMiner.Files.SLManagedScripting package which contains the SLManagedScript assembly that defines types, among others, in the Skyline.DataMiner.Scripting namespace.)
I hope this clarifies things a bit, don't hesitate to ask if something is still unclear.
Hi Gerwin,
Can I assume that the nugets that you added to your project (automation script) are the following:
- Skyline.DataMiner.Core.DataMinerSystem.Common
- Skyline.DataMiner.Core.DataMinerSystem.Automation
- Skyline.DataMiner.Dev.Common
If this is the case. Can you verify that the first two nugets are of the same version. This can be already cause this problem.
Next to this the "Skyline.DataMiner.Dev.Common" nuget should be linked to your DataMiner version where you will deploy your package too. As I can see you added the version 10.4.2.6. I assume now that you are deploying this to a 10.4.2 DataMiner version? If your DataMiner version is below 10.4.2, it can cause your script to throw these exceptions.
Hope this helps.
Can you describe how you deployed the script?
Was this done by a DMAPP package or via other means?
It could be that the nugets were not deployed along the script. You can verify this by going to the Skyline DataMinerProtocolScriptsDllImportskyline.dataminer.dev.common and check if the version 10.4.2.6 is present on all DMAs of that system.
both through an gitlab pipeline which build an dmapp and through dis publish to an local dma. Both have the same issue. i’ll check the location
Checked the location and i;ve only have version with 1.x. etc. So the file isn;t packaged.
+ there is no .dev. only .core.dataminersystems
I’m missing the using Skyline.DataMiner.Dev.Common;
But if i add that i get an error:
he type or namespace name ‘Dev’ does not exist in the namespace ‘Skyline.DataMiner’ (are you missing an assembly reference?)
I’m having both nugets:
Skyline.DataMiner.Dev.Common
Skyline.DataMiner.Dev.Automation
on version 10.4.2.6 and i’m targeting version 10.4.2