Hi,
I'm creating a script using System.Xml.Linq.dll in my script.xml is the following:
<Exe id="2" type="csharp">
<Value><![CDATA[[Project:Cs_sharpProject]]]></Value>
<!--<Param type="debug">true</Param>-->
<Message></Message>
<Param type="ref">System.Xml.Linq.dll</Param>
</Exe>
However when i publish this with DIS the DLL Reference field keeps empty in in the automation view. Adding a script reference will show. How do i fix this so i can just publish the script and i dont have to do some manual steps after?
Hi Gerwin
This can be solved by adding this tag to the cproj (SDK-style) of the script:
<PropertyGroup>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
</PropertyGroup>
By default, Visual Studio adds the framework references, but they aren't specified in the csproj. That is why DIS doesn't see those references and doesn't add them. After adding the tag and adding the framework assembly, I was able to properly generate those references.
We'll look in adding that tag in the Visual Studio Templates so that future solutions won't have this problem anymore.
Can you see in the csproj file the following tag:
Referencing the assembly again should result in this. I’ve tried it myself and for me it adds it correctly. I’m currently using the latest DIS version (2.42.1.7) and SDK-style projects.
added a tab to the.cproj and it worked.
Maybe the file wasn’t properly saved?
Yes might be, or not properly reloaded or something. 🙂 it works now that’s important 🙂
https://github.com/SkylineCommunications/Skyline.DataMiner.VisualStudioTemplates/pull/11