c# - How to read Property pages from visual studio addin -
i'm working on visual studio add-in debug biztalk maps using external objects. have roadblock read existing property page biztalk map files (.btm properties). able read file configuration reading file. i'm not sure how read property pages. i'm looking values of testmap input instance , testmap output instance. tried this, buildpropertystorage null.
projectitem projectitem = _applicationobject.selecteditems.item(1).projectitem; string name = "name"; ivshierarchy hierarchy; microsoft.visualstudio.ole.interop.iserviceprovider sp = (microsoft.visualstudio.ole.interop.iserviceprovider)_applicationobject; intptr ip; guid id1, id2; id1 = id2 = typeof(svssolution).guid; int hr = sp.queryservice(ref id1, ref id2, out ip); ivssolution solution = (ivssolution)system.runtime.interopservices.marshal.getobjectforiunknown(ip); solution.getprojectofuniquename(projectitem.containingproject.uniquename, out hierarchy); ivsbuildpropertystorage buildpropertystorage = hierarchy ivsbuildpropertystorage; string value = null; if (buildpropertystorage != null) { uint itemid; string fullpath = (string)projectitem.properties.item("fullpath").value; hierarchy.parsecanonicalname(fullpath, out itemid); buildpropertystorage.getitemattribute(itemid, name, out value); }
Comments
Post a Comment