ホーム » ARCGIS » MapDocumentClassのコンストラクタはないと言われました

MapDocumentClassのコンストラクタはないと言われました

このコードをコンパイルすると
[code]
IMapDocument mapdoc = new MapDocumentClass();
[/code]
エラーが表示された
[code]
The type ‘ESRI.ArcGIS.Carto.MapDocumentClass’ has no constructors defined
[/code]
いやいやほかのプロジェクトでは全く問題ないしと思って調べると

stackoverflowさんに答えがありました
Interop type cannot be embedded
問題となったクラスのアセンブリの参照設定のプロパティ「embed Interrop Type」をfalseにすればよいらしい
img

※以下のようにコードを修正してもよいみたい
[code]
IMapDocument mapdoc = new MapDocument();
[/code]