<?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>Questions and suggestions</title><link>http://blogs.msdn.com/b/junfeng/archive/2006/12/05/questions-and-suggestions.aspx</link><description>I set the comment limit to 90 days. As a result, the original post for questions and suggestions has expired. This one is just to re-enable that. 
 Please post any questions or suggestions in this blog. 
 I have left fusion team. I can still answer</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Questions (DEVPATH) </title><link>http://blogs.msdn.com/b/junfeng/archive/2006/12/05/questions-and-suggestions.aspx#1788340</link><pubDate>Fri, 02 Mar 2007 18:52:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1788340</guid><dc:creator>spacattac</dc:creator><description>&lt;p&gt;junfeng,&lt;/p&gt;
&lt;p&gt;You were absolutely correct. &amp;nbsp;You have to go through Support and there is a QFE - if anybody else needs it have them refer to KB Article Number(s): 931338&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Lane&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1788340" width="1" height="1"&gt;</description></item><item><title>re: Questions and suggestions</title><link>http://blogs.msdn.com/b/junfeng/archive/2006/12/05/questions-and-suggestions.aspx#1781002</link><pubDate>Thu, 01 Mar 2007 22:47:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1781002</guid><dc:creator>Junfeng Zhang</dc:creator><description>&lt;p&gt;spacattac, &lt;/p&gt;
&lt;p&gt;I believe it is a bug in .Net framework 2.0, and there is a QFE available. &lt;/p&gt;
&lt;p&gt;Please contact Microsoft Product Support Service for more information.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1781002" width="1" height="1"&gt;</description></item><item><title>re: Questions (DEVPATH)</title><link>http://blogs.msdn.com/b/junfeng/archive/2006/12/05/questions-and-suggestions.aspx#1780944</link><pubDate>Thu, 01 Mar 2007 22:34:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1780944</guid><dc:creator>spacattac</dc:creator><description>&lt;p&gt;Your descriptions on DEVPATH were helpful, but I'm still having a problem. &amp;nbsp;I have a VS2005 solution where my NUnit project does just fine finding the Assemblies in my DEVPATH but my Web Site project fails to find them.&lt;/p&gt;
&lt;p&gt;Any thoughts or suggestions?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Lane&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1780944" width="1" height="1"&gt;</description></item><item><title>re: Questions and suggestions</title><link>http://blogs.msdn.com/b/junfeng/archive/2006/12/05/questions-and-suggestions.aspx#1770372</link><pubDate>Tue, 27 Feb 2007 22:50:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1770372</guid><dc:creator>Junfeng Zhang</dc:creator><description>&lt;p&gt;Sean, &lt;/p&gt;
&lt;p&gt;Common Control is still in Winsxs. It is used by every UI component in VIsta. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1770372" width="1" height="1"&gt;</description></item><item><title>winsxs on Vista Home Premium</title><link>http://blogs.msdn.com/b/junfeng/archive/2006/12/05/questions-and-suggestions.aspx#1745244</link><pubDate>Fri, 23 Feb 2007 06:39:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1745244</guid><dc:creator>Sean M</dc:creator><description>&lt;p&gt;On my newly installed Vista Home Premium setup, I appear to be missing the folder for Microsoft.Windows.Common-Controls in the WinSxS folder. Is this intentional? I cannot embed a manifest referencing the version 6.x common controls in Visual Studio 2005 without it. Is there a way to fix this?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1745244" width="1" height="1"&gt;</description></item><item><title>re: Questions and suggestions</title><link>http://blogs.msdn.com/b/junfeng/archive/2006/12/05/questions-and-suggestions.aspx#1456870</link><pubDate>Fri, 12 Jan 2007 21:37:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1456870</guid><dc:creator>Junfeng Zhang</dc:creator><description>&lt;p&gt;john.carneiro &lt;/p&gt;
&lt;p&gt;I haven't tried the scenario you described. There is no caching for assembly in GAC. So your scenario in theory should work. &lt;/p&gt;
&lt;p&gt;If you want me to guess, I will probably say it is caused by the same caching binding failure breaking change above. &lt;/p&gt;
&lt;p&gt;In any case, fusion binding log is your friend. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1456870" width="1" height="1"&gt;</description></item><item><title>re: Questions and suggestions</title><link>http://blogs.msdn.com/b/junfeng/archive/2006/12/05/questions-and-suggestions.aspx#1456868</link><pubDate>Fri, 12 Jan 2007 21:33:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1456868</guid><dc:creator>Junfeng Zhang</dc:creator><description>&lt;p&gt;John L,&lt;/p&gt;
&lt;p&gt;I think it is possible. But I am not the best person to answer your question, as I don't know much about resource loading. Try to ask in BCLTeam's blog. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1456868" width="1" height="1"&gt;</description></item><item><title>re: Questions and suggestions</title><link>http://blogs.msdn.com/b/junfeng/archive/2006/12/05/questions-and-suggestions.aspx#1456863</link><pubDate>Fri, 12 Jan 2007 21:29:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1456863</guid><dc:creator>john.carneiro</dc:creator><description>&lt;p&gt;I am having a Fusion API issue when using the CreateAssemblyCache() and InstallAssembly() calls descibed&lt;/p&gt;
&lt;p&gt;described in the online doc:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.grimes.demon.co.uk/workshops/fusWSTen.htm"&gt;http://www.grimes.demon.co.uk/workshops/fusWSTen.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is the main &amp;nbsp;doc:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.grimes.demon.co.uk/workshops/fusionWS.htm"&gt;http://www.grimes.demon.co.uk/workshops/fusionWS.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this the .NET 2.0 C# code snippet.&lt;/p&gt;
&lt;p&gt;I am basically installing an assembly in the GAC using the fusion API&lt;/p&gt;
&lt;p&gt;under an app domain. After successfully installing it I try&lt;/p&gt;
&lt;p&gt;loading it using the full name (an.FullName = &amp;quot;Waters.Scheduler.Resources&amp;quot;, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9248a9e9e65bdbea&amp;quot;)&lt;/p&gt;
&lt;p&gt;and it fails to load&lt;/p&gt;
&lt;p&gt;a = Assembly.Load(an.FullName); &lt;/p&gt;
&lt;p&gt;Interestingly, when I exit my program and restart it then finds it ok. &lt;/p&gt;
&lt;p&gt;Does the fusion API somehow need be refreshed somehow?&lt;/p&gt;
&lt;p&gt;Does the fusion API need to be called from another app domain for the&lt;/p&gt;
&lt;p&gt;Assembly.Load(an.FullName); &lt;/p&gt;
&lt;p&gt;to recognize the GAC assembly?&lt;/p&gt;
&lt;p&gt;I was thinking a seerate process then may need to install the assemblies in the GAC, then load&lt;/p&gt;
&lt;p&gt;them on the main process.&lt;/p&gt;
&lt;p&gt;Or is this a bug or I am using the API the wrong way?&lt;/p&gt;
&lt;p&gt;The AssemblyCache.InstallAssembly() method calls the fusion API via some wrapper code arround the API.&lt;/p&gt;
&lt;p&gt;Thanks for any help given.&lt;/p&gt;
&lt;p&gt;-&lt;/p&gt;
&lt;p&gt;//***********************************************************&lt;/p&gt;
&lt;p&gt;// If assembly is signed, then add it to the GAC&lt;/p&gt;
&lt;p&gt;//***********************************************************&lt;/p&gt;
&lt;p&gt;if (localAName.GetPublicKeyToken() != null &amp;amp;&amp;amp; localAName.GetPublicKeyToken().Length != 0)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;// Impersonate EverestUser account&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;tokenHandle = IntPtr.Zero;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;dupeTokenHandle = IntPtr.Zero;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;// Call LogonUser to obtain a handle to an access token.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;bool returnValue = LogonUser(adminUserName, null, adminPassword,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LOGON32_LOGON_SERVICE, LOGON32_PROVIDER_DEFAULT,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ref tokenHandle);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;// Check return value&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;if (!returnValue)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new DeploymentException(&amp;quot;LogonUserFailed&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;else&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Impersonate everest service user&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bool retVal = DuplicateToken(tokenHandle, SecurityImpersonation, ref dupeTokenHandle);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch (Exception e)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new DeploymentException(&amp;quot;DupTokenLogonFailed&amp;quot;, e.Message);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// The token that is passed to the following constructor must &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// be a primary token in order to use it for impersonation.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WindowsIdentity newId = new WindowsIdentity(dupeTokenHandle);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WindowsImpersonationContext impersonatedUser = newId.Impersonate();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Install assembly into the GAC&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// The force flag forces the reinstall of an assembly regardless of any &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// &amp;nbsp; &amp;nbsp;existing assembly with the same assembly name&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AssemblyCache.InstallAssembly(localFileName, null, AssemblyCommitFlags.Force);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch (Exception e)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new DeploymentException(&amp;quot;GacInstallFailed&amp;quot;, e.Message, localFileName);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;finally&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Stop impersonating the user.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;impersonatedUser.Undo();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;// delete the local copy, since we only need it in the GAC&lt;/p&gt;
&lt;p&gt;File.Delete(localFileName);	&lt;/p&gt;
&lt;p&gt;// this fails to find the assembly in the GAC&lt;/p&gt;
&lt;p&gt;Assembly a = Assembly.Load(an.FullName); &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1456863" width="1" height="1"&gt;</description></item><item><title>re: Questions and suggestions</title><link>http://blogs.msdn.com/b/junfeng/archive/2006/12/05/questions-and-suggestions.aspx#1446057</link><pubDate>Thu, 11 Jan 2007 00:47:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1446057</guid><dc:creator>John L</dc:creator><description>&lt;p&gt;I think i have a theory.&lt;/p&gt;
&lt;p&gt;The assembly I'm returning has a culture of 'en', but the threadCulture is set to en-US.&lt;/p&gt;
&lt;p&gt;If the ResourceResolve event asks for an en-US assembly and I return an assembly with an 'en' culture, will that cause it to fail?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1446057" width="1" height="1"&gt;</description></item><item><title>re: Questions and suggestions</title><link>http://blogs.msdn.com/b/junfeng/archive/2006/12/05/questions-and-suggestions.aspx#1445906</link><pubDate>Thu, 11 Jan 2007 00:15:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1445906</guid><dc:creator>Junfeng Zhang</dc:creator><description>&lt;p&gt;This may have been caused by the caching of assembly binding failures in .Net framework 2.0. &lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/junfeng/archive/2004/07/22/190813.aspx"&gt;http://blogs.msdn.com/junfeng/archive/2004/07/22/190813.aspx&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1445906" width="1" height="1"&gt;</description></item></channel></rss>