Le réseau pour les développeurs > Forums - Accueil > Visual C++ General > C1108, alink.dll not found after installing Windows7
Poser une questionPoser une question
 

PermanentC1108, alink.dll not found after installing Windows7

  • samedi 8 août 2009 13:41nobugzMVP, ModérateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    After installing Windows 7 (nice), I lost the ability to compile C++/CLI, getting compile error C1108 using Visual Studio 2008 and complaining that it couldn't load alink.dll.  That file is present in the c:\windows\microsoft.net\framework subdirectory, adding the path to the VC++ Directories setup didn't fix the problem.

    Assuming something got munched in the setup, I ran the Repair option.  That failed miserably with a endless chain of error 2908 prompts.  The relevant error message in the MSI log file looked like this:

    \Microsoft.VisualStudio.Data.Framework,version="9.0.0.0",publicKeyToken="b03f5f7f11d50a3a",processorArchitecture="MSIL",fileVersion="9.0.30729.1",culture="neutral",State=3,,Disk=1,SharedDllRefCount=0,BinaryType=0)
    MSI (s) (44:80) [04:45:21:450]: MSCOREE not loaded loading copy from system32
    MSI (s) (44:80) [04:45:21:465]: Assembly Error:Function not defined in specified DLL.

    MSI (s) (44:80) [04:45:21:465]: Note: 1: 1935 2:  3: 0x8002802F 4:  5: CreateAssemblyNameObject 6: Microsoft.VisualStudio.Data.Framework,version="9.0.0.0",publicKeyToken="b03f5f7f11d50a3a",processorArchitecture="MSIL",fileVersion="9.0.30729.1",culture="neutral"
    MSI (s) (44:80) [04:47:00:712]: Product: Microsoft Visual Studio Team System 2008 Development Edition - ENU -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2908. The arguments are: {49A73270-6CA9-4B78-A335-0AF8C187213A}, ,

    This pointed to a problem with mscoree.dll.  After digging for a while, I discovered that its LoadLibraryShim() entry point was failing.  Running a test program that used LoadLibraryShim() to load fusion.dll failed with a file-not-found error.  Peeking at this test program with ProcMon.exe showed it was rooting through .NET 4.0 registry keys.  Using a  .exe.config file that contained at <requiredRuntime> element to force it to use .NET 2.0 solved the problem.  Not a practical solution.  Clearly, Windows 7 destroyed the .NET 4.0 configuration.

    Here's my mistake: I should have uninstalled VS2010 and .NET 4.0 beta 1 before installing Windows 7.

    Well, I didn't.  You probably didn't either when you're reading this post.  Uninstalling VS2010 afterwards didn't fix the problem.  Re-installing .NET 4.0 beta 1 did.  I'm not so sure what shape my machine is in now, definitely contemplating reinstalling Win7 from scratch.
    Hans Passant.

Toutes les réponses

  • dimanche 9 août 2009 15:59Ted_ Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Thanks for the tip - luckily I uninstalled all the .NET 4.0/VC2010 stuff as well (I had a feeling about it for some reason) before upgrading to Windows 7, but this would have been a major problem for me if I hadn't.  But thanks for the workaround.

    As it happened I had to downgrade yesterday back to Vista (using my Windows Home Server restore) for other reasons (DXVA problems with HD-DVD), but I'll definitely use this info for my work and when I re-attempt another upgrade again.
  • lundi 10 août 2009 14:15Chris.P.J Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    This is excellent to know. I was running into this problem a lot on my Windows 7 machine. In that setup, I installed Windows 7, then VS 2010 Beta 1, with it's requisite .NET 4.0 beta 1.
    I may try re-installing .NET 4.0 beta 1, and see if that fixes the problem.
  • mercredi 14 octobre 2009 14:06Jonathan Winata Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    I don't have VS2010 and .NET 4.0 beta 1 installed on mine, but also got the C1108, alink.dll not found after upgrading to Windows 7.  I am stalling for beta 2 on .NET 4.0.
  • lundi 2 novembre 2009 14:45Jonathan Winata Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    I installed beta 2 (available to MSDN subscriber since Oct 19) and do not have C1108 issue anymore.

  • lundi 2 novembre 2009 20:39Vegan Fanatic Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Réponse proposée
    I have long recommended a fresh install and I prefer to use beta stuff in a virtual PC for obvious reasons.

    Vote if answered or helpful, I am running for Office (joke)! IT/Developer, Windows/Linux/Mainframe

    Server: IBM PC 300GL, Pentium III 667, Linux Server, has a 137GB disk limit, making it useless for upgrading my chess site

    Workstation: Asus M2NBP-VM CSM, Athlon64 X2 4200+ 65W CPU, 2GB RAM, NVIDIA 8600GT, 320GB + 160G backup, Windows 7 Ultimate x64.