Hi Dojo,
Is the direct usage of the DMSClass instance still allowed?
An existing protocol is having the below line of code throwing us an error:
When the engineer tried out the protocol on the DMS, it does seem to compile and run just fine.
Is there a way to mitigate the error in Visual Studio while developing?
Thanks!
While the usage of the raw Interop.SLDms.DMSClass objects is discouraged, you can solve this error ("Interop type 'DMSClass' cannot be embedded. Use the applicable interface instead.") from the Project References in Visual Studio: Open the properties for the Interop.SLDms project reference and set the "Embed Interop Types" option to false
The above solution did not work for me but this one did:
1. In Visual Studio, open “Tools/Options…”
2. Type “NuGet” in the search box
3. Go to “NuGet Package Manager/General”
4. Change default package management format: (from Packages.config to PackageReference)
5. Hit the “Clear All NuGet Cache(s)”
6. Close all and restart Visual Studio
7. Open the solution in Visual Studio
8. Open the problematic QAction and Build
For Wouter suggestion: it works indeed, BUT : you have to do it for every qaction, every time you open it. So everytime the DIS folder is cleaned, you have to redo that for all qactions you want to debug : not very handy and very time consuming
Julien’s solution : did not work for me : PackageReference was already the default format. Changed it back and forth + + cleared cache + restarted everything,… No success
Reverting back to an older DIS version did solve the issue. Older DIS versions uses as default Embeded Interop Types : False. So now we do not have to change that default every time we want to debug a qaction
Thanks Wouter. Tested this configuration and it works.