Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Paolo F Cantoni on December 20, 2019, 05:47:37 pm
-
I haven't touched my Diagrammer C# code in over a year but due to change of "gig", need to recompile in a new environment. I've had to move up to .Net 4 (I think because the later Interop.EA.dll requires that). However, I'm getting the following message from the C# compiler:
Severity Code Description Project File Line Suppression State
Error CS1752 Interop type 'ConstLayoutStyles' cannot be embedded. Use the applicable interface instead. <project> <path>\<file> 389 Active
(where <project> <path>\<file> have been removed...)
A sample code that worked was:
Layout(
ConstLayoutStyles.lsCrossReduceAggressive
+ ConstLayoutStyles.lsCycleRemoveDFS
+ ConstLayoutStyles.lsLayeringOptimalLinkLength
+ ConstLayoutStyles.lsInitializeDFSOut
+ ConstLayoutStyles.lsLayoutDirectionDown
, s_PROCESS_NAME
); //ONLY layout if inserted....
Searching for a solution implies that I need to set the Embed Interop Assembly property to false for the project, but I can't seem to find it. Is there "an applicable interface" instead? The documentation on the Sparx site for ConstLayoutStyles doesn't imply that.
HELP!!!
Paolo
-
Paolo,
Check your References for Interop.EA
Then in the properties of that set "Embed Interop Type" to False
It's not specific to ConstLayoutStyles. You would run into other issues even if you didn't use that enumeration.
Geert
-
Paolo,
Check your References for Interop.EA
Then in the properties of that set "Embed Interop Type" to False
It's not specific to ConstLayoutStyles. You would run into other issues even if you didn't use that enumeration.
Geert
Thanks, Geert!
That did the trick! Looks like this was the only enum I'm using that suffers from that problem.
Avagoodweegend as we say in Oz!
Paolo