开发者

Why is my plug-in built with Ocean/Petrel 2010.2.2 not working with 2010.2?

开发者 https://www.devze.com 2023-03-20 03:11 出处:网络
We have built a plug-in with the latest Ocean/Petrel hotfix: 2010.2.2. All our tests work OK. But the plug-in crashes when used with 2010.2.

We have built a plug-in with the latest Ocean/Petrel hotfix: 2010.2.2. All our tests work OK. But the plug-in crashes when used with 2010.2.

Any advic开发者_如何学运维e from anyone?


Ocean/Petrel releases are classified as follow:

  • Major releases: 2009.1, 2010.1, 2011.1
  • Minor releases, or patches: 2009.2, 2010.2, 2011.2
  • Hot fixes: 2010.2.1, 2010.2.2

Major releases are not binary compatible: a plug-in compiled against 2009.1 needs to be recompiled to work with 2010.1. With the 2 year API stability, it should be just a recompilation. You might have warnings about Obsolete APIs that will be deprecated in the next release, but it should be a quick task.

Minor releases are usually backward binary compatible: Petrel 2010.2 will be able to run a plug-in compiled with 2010.1. However forward binary compatibility is not ensured: Petrel 2010.1 will not run a plug-in compiled with 2010.2.
Note that Minor releases can also introduce few, but new APIs.

Hot fixes are always backward binary compatible: Petrel 2010.2 can run plug-ins compiled with 2010.1, 2010.2, 2010.2.1. However forward binary compatibility is currently not ensured: Petrel 2010.2 will not run plug-ins compiled with 2010.2.1 or 2010.2.2.
Hot fixes never introduce new APIs.

So the rules are:

  • Always compile your plug-in with the last Major Release (in your case 2010.1),
  • Compile your plug-in with the latest Minor release (2010.2) if you absolutly need a new API introduced in this patch.
  • But Never compile your plug-in against hot fixes,

Not following these rules will force your clients to use, deploy or redeploy the patch or hot fix you used to build your plug-in. This will delay (best case) or prevent (worse case) sales/adoption of you plug-in by your clients.

Hope it helps
Regards
Vincent


I have also found this to be a problem. What i do is keep a copies of the Public folder for each version of Petrel and link the references to the folder/version i wish to compile against instead of always linking to the installed petrel version. You can switch easily using a .targets file. I then follow what Vincent said and ensure to reference the appropriate dlls for a build.

So, even if i have Petrel 2010.2 i reference the 2010.1 libraries during the build.

Grant

0

精彩评论

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

关注公众号