الرجوع إلى تجميعات التنفيذ التلقائي و الكائن DTE2

إلى إنشاء automation applications, you must perform steps إلى gain الوصول إلى the automation الأعضاء. أول, you must مرجع the requisite automation تجميعات, و ثانية, you must يحصل a مرجع إلى the الأعلى-المستوى كائن, DTE2.

في ‏‫Visual Studio .NET 2002 و ‏‫Visual Studio .NET 2003, الجميع core automation عناصر were located في an تجميع named EnvDTE, و its الأعلى, هرمى كائن هو the DTE كائن. It هو the الكائن الأصل for الجميع core automation الكائنات, collections, و their الأعضاء. DTE2مشتقة منDTE.

في Visual Studio 2005 و Visual Studio 2008, additions و تحديثات were made إلى some of these الكائنات, collections, و الأعضاء. Rather than تحديث the موجود تجميع و compromise للخلف-توافق for موجود إضافة-زر 'Ins' و automation مشاريع, الجميع جديد, محدث functionality هو في an تجميع named EnvDTE80 (EnvDTE الإصدار 8.0) و EnvDTE90 (EnvDTE الإصدار 9.0). Most محدث دالات في EnvDTE80 و EnvDTE90 maintain the same أسماء كـ السابق versions but append a رقم إلى the إنهاء of the دالة اسم. For مثال, the newer الإصدار of the TaskItems مجموعة هو named TaskItems2, و the newer الإصدار of the Solution كائن هو named Solution2. Because the جديد الأعضاء are المزيد قوة than السابق versions و contain the latest functionality, the recommended approach هو إلى استخدم the جديد الكائنات و collections when writing جديد automation applications.

Although جديد عناصر are في EnvDTE80 و EnvDTE90, most of the core automation functionality هو still في EnvDTE. So, when you write جديد automation applications (such كـ إضافة-زر 'Ins'), be sure إلى مرجع EnvDTE, EnvDTE80, و EnvDTE90. You can do this في واحد step بواسطة referencing the COM مكتبات "Microsoft Development بيئة 8.0" و "Microsoft Development بيئة 9.0." Also, if you استخدم الأعضاء من the EnvDTE تجميع, you must also التعيين a مرجع إلى كلاهما the DTE كائن و the DTE2 كائن. This gives you الوصول إلى الجميع of the عناصر.

For معلومات حول gaining الوصول إلى the مشروع-specific كائن نماذج, see مجموعات عمل للتنفيذ التلقائي.

في هذا القسم

أقسام ذات صلة