开发者

Correctly link against MapPoint DLL

开发者 https://www.devze.com 2023-04-03 15:19 出处:网络
I have a C# application referencing the \"Microsoft MapPoint 18.0 Object Library (North America)\" ActiveX control library - I added this under \"References\" in my project.

I have a C# application referencing the "Microsoft MapPoint 18.0 Object Library (North America)" ActiveX control library - I added this under "References" in my project.

The application builds, and I put a try/catch around the call to new MapPoint.Application(), so I would be able t开发者_如何学JAVAo detect if MapPoint is installed, and display an error-message when that part of the application is unavailable - that is, my application doesn't require MapPoint, it just has some extra functionality if MapPoint is available.

The problem is, I now have a compile-time dependency on the MapPoint binaries - the application can't build on a workstation that doesn't have MapPoint installed.

Is there a way around this?


When you add the reference to your project, VS should be creating an interop file for you. This is all you need in order to compile, so you can put it in a shared location or your SCM tool.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号