locked
Error occurred while restoring NuGet packages: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)) RRS feed

  • Question

  • Hello,

    I am trying to build a solution that is checked out from Subversion. I opened the solution on a newly installed Visual Studio 2013. The solution has around 17 projects. The solution has Packages folder in it containing packages. When I try to build the solution all of failed. In the output window I see the error "Error occurred while restoring NuGet packages: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))". I see that the Nuget Package Manager that came installed with VS 2013 has version 2.8.50313.46. I made sure that the package manager settings has the both the options "Allow NuGet to download missing packages" checked. I am new to VS 2013 and I don't have any clue or help from online forums. Please help me solve this.

    Friday, April 25, 2014 8:15 PM

Answers

  • Hi,

    Sorry for delay!

    Please make sure that you have choose the option "automatically check for missing packages during build in Visual Studio".

    >> I see that the Nuget Package Manager that came installed with VS 2013 has version 2.8.50313.46.

    The version of the Nuget Package Manager in my Visual Studio 2013 is 2.7.40911.287. However, I guess this is not the reason.

    Microsoft.Bcl.Build and Microsoft.Bcl.Compression require custom target files, which do not work well with NuGet’s package restore feature. The easiest way to fix the package restore issues is by checking in any .targets files that are stored under the packages directory.

    You can try to run nuget.exe to restore packages before you actually run MSBuild on your solution:

    nuget.exe install .\PortableClassLibrary3\packages.config
    

    This ensures that by the time MSBuild loads the project all .targets are already present.

    Please check this blog "NuGet Package Restore Issues".

    Best regards,

    • Marked as answer by Anna Cc Wednesday, June 4, 2014 1:53 PM
    Friday, May 30, 2014 8:25 AM

All replies

  • Hi Kiran,

    >>I opened the solution on a newly installed Visual Studio 2013.

    Please check if there are any differences of the settings and configurations compared with the compiler which used to create the project.

    Best regards,

    Sunny

    Monday, April 28, 2014 8:03 AM
  • Hello Sunny,

    Thank you for your reply. Are you talking about .suo file? I am opening the project using VS 2013 installed from same setup with which the project was created. The packages were actually checked into subversion. So when I checked out the whole solution, the packages were also downloaded. Since the packages are also included in the solution, I tried  un-checking the option "Allow nuget to download missing packages" from tools -> Package manager Settings. But after this if I rebuild the whole solution or any of the projects, the build fails without listing any errors!!! If I turn on the consent for nuget to download missing packages , I get the error mentioned in my post "Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)". Please helppp me!!!

    Monday, April 28, 2014 1:54 PM
  • Hi,

    Sorry for delay!

    Please make sure that you have choose the option "automatically check for missing packages during build in Visual Studio".

    >> I see that the Nuget Package Manager that came installed with VS 2013 has version 2.8.50313.46.

    The version of the Nuget Package Manager in my Visual Studio 2013 is 2.7.40911.287. However, I guess this is not the reason.

    Microsoft.Bcl.Build and Microsoft.Bcl.Compression require custom target files, which do not work well with NuGet’s package restore feature. The easiest way to fix the package restore issues is by checking in any .targets files that are stored under the packages directory.

    You can try to run nuget.exe to restore packages before you actually run MSBuild on your solution:

    nuget.exe install .\PortableClassLibrary3\packages.config
    

    This ensures that by the time MSBuild loads the project all .targets are already present.

    Please check this blog "NuGet Package Restore Issues".

    Best regards,

    • Marked as answer by Anna Cc Wednesday, June 4, 2014 1:53 PM
    Friday, May 30, 2014 8:25 AM
  • Hi Kiran, 

    Did you find a solution  ? I have the same problem :( 

    Elif

    Wednesday, September 3, 2014 5:07 PM