Questions and suggestions

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 questions about fusion and SxS. For feature/change suggestions, you can try Alan Shi, or many of the CLR bloggers.

Thanks for reading.

Comments (16)

  1. Carlos says:

    Obvious question: what are you doing now and will you be blogging it?

  2. I work in Windows Live now.

    You can probably tell from my recent articles. I probably will talk about random programming questions.

    I still have a few things wanted to discuss in the assembly binding though. When I get time I will post them.

  3. Some time my GAC folder is empty, it shows 0 files. I normally try few things like closing all instances of visual studio, reset IIS, reset Biztalk(since thats my day job) shut down antivirus etc etc….it works some times…else i need to do a reboot….any idea why this is happening??



  4. Colin Finck says:

    I have a question concerning SxS: I want to use the VC80 CRT on WinPE 2.0.

    How can I do this?

    I already copied the folder, which contains the "msvcm80.dll", "msvcp80.dll" and "msvcr80.dll" files into the WinSxS folder of the WinPE.

    But when I try to start a test application, which is dynamically linked to these files, I get a side-by-side configuration error. A trace with "sxstrace.exe" shows a "Did not find the assembly in WinSxS" error. Do you know what I am doing wrong?

    Statically linked applications work without problems.

    BTW, is there another way to get in contact with you (i.e. by E-Mail) than just this blog?

    Thanks in advance and best regards,

    Colin Finck

  5. Saravana,

    I have no idea. Sorry.


    You can’t xcopy files to winsxs directory in Vista, and expect it to work. (when you say WinPE 2.0, I assume it is Vista).

    You should look into using the API to install it.

  6. JohnL says:

    Have a question about the ResourceResolve event.

    Our product is using satellite assemblies for localization.  To get localized strings we call ResourceManager.GetString().

    The tricky part is we’re trying to deploy the resource files on-demand from a server.  When the code hits the GetString call, the ResourceResolve event is triggered.

    My event handler code downloads the file, installs it into the GAC and returns an Assembly object.  But the GetString call asserts with a MissingManifestResourceException.

    But, because I installed the file into the GAC, the next time I run the resources work fine.

    There must be a difference between me returning an Assembly oibject and when it gets the resources from the GAC.  Any ideas?


  7. This may have been caused by the caching of assembly binding failures in .Net framework 2.0.

  8. John L says:

    I think i have a theory.

    The assembly I’m returning has a culture of ‘en’, but the threadCulture is set to en-US.

    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?

  9. john.carneiro says:

    I am having a Fusion API issue when using the CreateAssemblyCache() and InstallAssembly() calls descibed

    described in the online doc:

    Here is the main  doc:

    In this the .NET 2.0 C# code snippet.

    I am basically installing an assembly in the GAC using the fusion API

    under an app domain. After successfully installing it I try

    loading it using the full name (an.FullName = "Waters.Scheduler.Resources", Version=, Culture=neutral, PublicKeyToken=9248a9e9e65bdbea")

    and it fails to load

    a = Assembly.Load(an.FullName);

    Interestingly, when I exit my program and restart it then finds it ok.

    Does the fusion API somehow need be refreshed somehow?

    Does the fusion API need to be called from another app domain for the


    to recognize the GAC assembly?

    I was thinking a seerate process then may need to install the assemblies in the GAC, then load

    them on the main process.

    Or is this a bug or I am using the API the wrong way?

    The AssemblyCache.InstallAssembly() method calls the fusion API via some wrapper code arround the API.

    Thanks for any help given.


    // If assembly is signed, then add it to the GAC


    if (localAName.GetPublicKeyToken() != null && localAName.GetPublicKeyToken().Length != 0)


       // Impersonate EverestUser account

       tokenHandle = IntPtr.Zero;

       dupeTokenHandle = IntPtr.Zero;

       // Call LogonUser to obtain a handle to an access token.

       bool returnValue = LogonUser(adminUserName, null, adminPassword,


           ref tokenHandle);

       // Check return value

       if (!returnValue)


           throw new DeploymentException("LogonUserFailed");




           // Impersonate everest service user



               bool retVal = DuplicateToken(tokenHandle, SecurityImpersonation, ref dupeTokenHandle);


           catch (Exception e)


               throw new DeploymentException("DupTokenLogonFailed", e.Message);


           // The token that is passed to the following constructor must

           // be a primary token in order to use it for impersonation.

           WindowsIdentity newId = new WindowsIdentity(dupeTokenHandle);

           WindowsImpersonationContext impersonatedUser = newId.Impersonate();



               // Install assembly into the GAC

               // The force flag forces the reinstall of an assembly regardless of any

               //    existing assembly with the same assembly name

               AssemblyCache.InstallAssembly(localFileName, null, AssemblyCommitFlags.Force);


           catch (Exception e)


               throw new DeploymentException("GacInstallFailed", e.Message, localFileName);




               // Stop impersonating the user.





    // delete the local copy, since we only need it in the GAC


    // this fails to find the assembly in the GAC

    Assembly a = Assembly.Load(an.FullName);      

  10. John L,

    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.

  11. john.carneiro

    I haven’t tried the scenario you described. There is no caching for assembly in GAC. So your scenario in theory should work.

    If you want me to guess, I will probably say it is caused by the same caching binding failure breaking change above.

    In any case, fusion binding log is your friend.

  12. Sean M says:

    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?

  13. Sean,

    Common Control is still in Winsxs. It is used by every UI component in VIsta.

  14. spacattac says:

    Your descriptions on DEVPATH were helpful, but I’m still having a problem.  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.

    Any thoughts or suggestions?



  15. spacattac,

    I believe it is a bug in .Net framework 2.0, and there is a QFE available.

    Please contact Microsoft Product Support Service for more information.

  16. spacattac says:


    You were absolutely correct.  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



Skip to main content