Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / March 2006

Tip: Looking for answers? Try searching our database.

IVsBuildPropertyStorage not always working

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stuart Carnie - 30 Mar 2006 17:31 GMT
I have created a Flavored project, and have subscribed to
IVsHierarchyEvents.

When the OnItemAdded event is fired, I am inspecting the file that was
just added via the itemId passed in, and if it is a file I am interested
in, I would like to add additional properties to this nodes item in the
project file.  I use the IVsBuildPropertyStorage::SetItemAttribute()
member, however if I try to do call during the OnItemAdded event, it
does not persist anything and returns E_FAIL.

I know the itemId is correct, because during the OnItemAdded event, I
call IVsProject::GetMkDocument on the same itemId and it returns the
file path.

Why would this be failing, and how would I go about updating the project
file when this item is added?

Cheers,

Stuart
Stuart Carnie - 30 Mar 2006 17:57 GMT
> I have created a Flavored project, and have subscribed to
> IVsHierarchyEvents.
[quoted text clipped - 16 lines]
>
> Stuart

Also, is there a way when an item is added to the IVsHierarchy of my
Flavored project, I can override the item type it is created as or do I
have to use the Automation model and do it after it has been added?

Example, rather than my xml document being added to the project as
<ItemGroup>
  <None Include="my.myxml" />
</ItemGroup>

can I hook the IVsHierarchy somehow, so it is automatically added as,
with additional data

<ItemGroup>
  <MyXml Include="my.myxml">
    <Data1>MyExtraData</Data1>
  </MyXml>
</ItemGroup>

Cheers,

Stu
"Gary Chang[MSFT]" - 31 Mar 2006 07:58 GMT
Hi Stuart,

Thank you posting!

This is a quick note to let you know that I am performing research on this
issue and will get back to you as soon as possible. I appreciate your
patience.

Thanks for your understanding.

Best regards,

Gary Chang
Microsoft Community Support
======================================================
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006.  Please complete a re-registration process by
entering the secure code mmpng06 when prompted. Once you have entered the
secure code mmpng06, you will be able to update your profile and access the
partner newsgroups.
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.