<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Dr. eX's Blog : ProjectAggregator2</title><link>http://blogs.msdn.com/dr._ex/archive/tags/ProjectAggregator2/default.aspx</link><description>Tags: ProjectAggregator2</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Visual Studio Extensibility Forum FAQ Lite</title><link>http://blogs.msdn.com/dr._ex/archive/2007/02/23/visual-studio-extensibility-forum-faq-lite.aspx</link><pubDate>Sat, 24 Feb 2007 03:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1750002</guid><dc:creator>Dr. Ex</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/dr._ex/comments/1750002.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dr._ex/commentrss.aspx?PostID=1750002</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; TEXT-ALIGN: justify"&gt;&lt;FONT face=Calibri size=3&gt;What? No email link to talk to the Doctor directly. Yes that is true the email link has been removed from the blog. Dr. Ex and his assistants recommend use of &lt;/FONT&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=57&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri color=#800080 size=3&gt;Visual Studio Extensibility Forum&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; instead. Your questions get exposed to a broader audience beyond just the doctor’s staff. Accept our apologies for any inconvenience caused.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; TEXT-ALIGN: justify"&gt;&lt;FONT face=Calibri size=3&gt;With that said the doctor and his team skimmed through recent forum posts and created the first Forum FAQ list. This list tries to address some generic questions that a lot of people have asked about on the forums.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; TEXT-ALIGN: justify"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 115%"&gt;&lt;FONT face=Calibri&gt;How do I use Visual Studio 2005 SDK on Windows Vista?&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; TEXT-ALIGN: justify"&gt;&lt;FONT face=Calibri size=3&gt;Visual Studio 2005 SDK and some of the components it installs assume you can run with admin privileges. In fact, to build a sample or a wizard generated VS Package require the ability to write to restricted sections of the registry and need to run elevated. However you can install the SDK and run samples even with UAC turned on. The doctor suggests that you always run Visual Studio elevated when creating VS Packages. One of my assistants Allen Denver has blogged about this in detail. Feel free to visit Allen’s &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/allend/archive/2006/06/23/644490.aspx"&gt;&lt;FONT face=Calibri color=#800080 size=3&gt;blog&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; for details.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; TEXT-ALIGN: justify"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 115%"&gt;&lt;FONT face=Calibri&gt;What is ProjectAggregator2 and why do I care about it?&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; TEXT-ALIGN: justify"&gt;&lt;FONT face=Calibri size=3&gt;ProjectAggregator2 is a redistributable component that ships with the Visual Studio 2005 SDK. This component is needed to work around the following issues when developing a custom project type based on the Managed Package Framework (MPF). The component solves two problems for MPF based project classes.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; TEXT-ALIGN: justify; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;COM Interop’s VARIANT marshaling behavior. For example Visual Studio implementation expects VT_PTR type for certain properties returned by the project’s IVsHierarchy::GetProperty implementation. The COM Interop marshaler always generated VT_INT instead. Deriving from this wrapper would ensure the right variant type to be returned.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; TEXT-ALIGN: justify; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Visual Studio’s project aggregation implementation. In classic COM aggregation the “outer” object creates the aggregated “inner” object. This “inner” object requires a reference to “outer’s” IUnknown so it can delegate calls to it. The “outer” object is created before the “inner”. In Visual Studio the creation of aggregated projects are controlled by the &lt;SPAN style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;SVsCreateAggregateProject&lt;/SPAN&gt; service. This service recursively creates a chain of aggregated objects. For example when creating a ProjectSubType (sample in VS SDK) project which aggregates the C# project system the “inner” (a C# project) object is created first and followed by the “outer” project (a ProjectSubType sample project). This service then sets the C# project as the inner project for the ProjectSubType project. However since ProjectSubType is implemented in managed code its IUnknown implementation cannot be customized. As a result proper delegation of calls does not happen. By deriving the MPF project type from CProjectAggregator2 class this problem can be avoided. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; TEXT-ALIGN: justify"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 115%"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; TEXT-ALIGN: justify"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 115%"&gt;&lt;FONT face=Calibri&gt;What’s up with this Package Load Failure Error? &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; TEXT-ALIGN: justify"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Dr. is pretty sure you have been bitten by this error one time or the other in your life developing packages for Visual Studio or just working with Visual Studio, unless you have been living a life of a hermit. Put in simple words, the package load failure indicates that Visual Studio had problem loading some functionality that a user explicitly or implicitly requested. &lt;SPAN style="mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;The typical reasons for package failing to load in Visual Studio are as follows. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in" type=disc&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; TEXT-ALIGN: justify; mso-list: l1 level1 lfo2"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;PLK Validation Failure&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;- Developer could have inadvertently changed either of the following: Package GUID, Company Name, Product Name, Product Version, and Min Edition in the package registration. These values should not be changed after a PLK has been associated with a package. Any changes necessitate a new PLK.&lt;/SPAN&gt;&lt;SPAN style="mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; TEXT-ALIGN: justify; mso-list: l1 level1 lfo2"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;Dependency Issues&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt; – Package could have been deployed in a way that either the dependencies are either missing on the machine or they are not in location that Visual Studio can load it from. A user can use ILDASM or Depends.exe or dumpbin.exe to isolate such issues. &lt;/SPAN&gt;&lt;SPAN style="mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; TEXT-ALIGN: justify; mso-list: l1 level1 lfo2"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Exception Thrown&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt; – At the time package is loaded by Visual Studio it calls IVsPackage::SetSite method. If the method throws an exception for some reason then the package load fails. The best way to isolate the issue is to debug and step through the code. &lt;/SPAN&gt;&lt;SPAN style="mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; TEXT-ALIGN: justify; mso-list: l1 level1 lfo2"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Im&lt;/SPAN&gt;&lt;/B&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;proper registration&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt; – Typically when you use the /assembly switch. Verify that package is signed appropriately and that registration has the right public key in it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; TEXT-ALIGN: justify"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; TEXT-ALIGN: justify"&gt;&lt;FONT face=Calibri size=3&gt;For more information on debugging this failure please refer to earlier post on &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/dr._ex/archive/2006/12/14/debugging-package-load-failures.aspx"&gt;&lt;FONT face=Calibri color=#800080 size=3&gt;Debugging Package Load Failures&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; TEXT-ALIGN: justify"&gt;&lt;FONT face=Calibri size=3&gt;I hope you found the information above useful. For your convenience I will also post this on the &lt;/FONT&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=57&amp;amp;SiteID=1"&gt;&lt;FONT face=Calibri color=#800080 size=3&gt;Visual Studio Extensibility Forum&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; as a pinned post so you can refer to it for there as well. Stay tuned for further updates.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; TEXT-ALIGN: justify"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; TEXT-ALIGN: justify"&gt;&lt;FONT face=Calibri size=3&gt;Thanks&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; TEXT-ALIGN: justify"&gt;&lt;FONT face=Calibri size=3&gt;Dr. eX&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1750002" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dr._ex/archive/tags/VS+SDK/default.aspx">VS SDK</category><category domain="http://blogs.msdn.com/dr._ex/archive/tags/VSPackages/default.aspx">VSPackages</category><category domain="http://blogs.msdn.com/dr._ex/archive/tags/ProjectAggregator/default.aspx">ProjectAggregator</category><category domain="http://blogs.msdn.com/dr._ex/archive/tags/Package+Load+Failure/default.aspx">Package Load Failure</category><category domain="http://blogs.msdn.com/dr._ex/archive/tags/ProjectAggregator2/default.aspx">ProjectAggregator2</category></item></channel></rss>