Visual Studio 2012: Component dll failed to load unable to start program

7,245

Solution 1

Other people experiencing similar have said (although this quote is for VS2010)

"...removed the .suo; .ncb; and user project file, then restarted the solution and it fixed the problem for me."

Source


Reinstallation


If the problem is with running a program in debug mode, then there is a KB article/fix for this. The details of this fix are copied here as well

Resolution 1
Right-click the Project Name in Solution Explorer, and then click Properties.
In the left pane of Properties, click to select Configuration Properties.
Click to select Debugging.
In the right pane, click to select the Unmanaged code debugging check box.

Resolution 2
In Microsoft Notepad, open Boot.ini, which is located in the System Drive folder (usually C:). This file may be hidden and read-only, so you may have to use dir /ASH to find it.
Remove all of the following switches, if found in the file:
/debug
/debugport
/baudrate

Restart the computer, start Visual Studio .NET, and then debug.


Change the Target Framework from ".NET Framework 4 Client Profile" to ".NET Framework 4".


This could be down to your Anti Virus blocking access to certain files! You could try it without the AV running.


Since it just happened, then I will suspect an update of some sort has occurred which has upset it. Roll back the system (system restore)!


Either way, I'm sorry but I can't give any real explanation as to why it would just happen.

Solution 2

After a lot of search I could not find out why Visual Studio was not working, so I decided to uninstall it completely and then install it again. At first there where also problems uninstalling it because of some missing .dll files. But i figured out that i need first to disable and then uninstall all the plugins in Visual Studio first. Now everything is working fine after I re-installed Visual Studio. I guess the problem was caused by a visual studio plugin (maybe NuGet Package Manager) but i am not sure.

Share:
7,245

Related videos on Youtube

Devid
Author by

Devid

Updated on September 18, 2022

Comments

  • Devid
    Devid over 1 year

    I am using Visual Studio Ultimate 2012 for months now and never experienced a problem. But today when i try to run a program i get the error :

    Error while trying to run the project: Unable to start porgramm 'C:\Users\...\EinfacherDelegate.exe'. A component dll failed to load. Try to restart this application. If failures continue, try disabling any installed add-ins or repair installation

    From Programs and Features (Control Panel) I repaired Visual Studio 2012 but the problem still remains. When I go to the project folder i can't find any dll files, I see the .exe file which is running correctly if I double click on it. From the error description i don't even know what dll is missing. Any ideas what i could do to solve the problem ? About what dll is visual studio talking ?

    Navigating to the executable file manually and running it works. The error above is produced when I press the "Run" button in VS2012.


    A Component dll failed to load


    the dependency walker

    Here are two files with the output from dependency walker.

    How can i find all these dll files ? And why are they suddenly missing from my Visual Studio 2012 when everything was working fine ?


    I also tried sfc /scannow and it restored some corrupted files, but it did not solve the problem with visual studio.


    I am not sure if this is normal but when i open a .cs file from my project and click on run in Visual Studio i get the massage:

    Unable to Connect Remote Debugging


    • magicandre1981
      magicandre1981 almost 11 years
      Trace such issues with Depends.exe: blogs.technet.com/b/askperf/archive/2010/06/25/…
    • Devid
      Devid almost 11 years
      @magicandre1981 thanks for the help. But should i put the visual studio ,that is devenv.exe or the .exe file from my project ?
    • magicandre1981
      magicandre1981 almost 11 years
      try sfc /scannow to detect and restore missing system files.
    • Dave
      Dave almost 11 years
      I wonder if your AV has blocked the files. Does it work if you disable your Anti Virus (if safe to do so)?
    • Devid
      Devid almost 11 years
      @magicandre1981 i did that too but the problem remains.
    • Devid
      Devid almost 11 years
      @DaveRook i will try that too and report back. I am using Microsoft Security Essentials.
    • Dave
      Dave almost 11 years
      @Devid When you say "run a program", do you mean VS won't load or that running a program in debug mode won't work? If so, does it run in release mode?
    • Devid
      Devid almost 11 years
      @DaveRook running a program in debug or release mode won't work.
    • GNT
      GNT almost 11 years
      you might be able to find the DLLs on dll-files.con
    • magicandre1981
      magicandre1981 almost 11 years
      please post the complete depends.exe output
    • Devid
      Devid almost 11 years
      @magicandre1981 ok i uploaded the files. I have put them on my google drive for download.
    • Dave
      Dave almost 11 years
      Do you get the same issue with new projects? Can you create a new console application, leave it as is, and run in debug mode to see if it compiles?
  • Devid
    Devid almost 11 years
    I am trying the first solution before i move to the next solution you suggested, but i can't find a file with .ncb ending in my project.
  • Devid
    Devid almost 11 years
    @DaveRock nothing happens everything remains the same. I have removed the .suo file and the user project file but i still get the same message that a dll could not run. I will move on with the next solution.
  • Dave
    Dave almost 11 years
    Also, what happens if you open your References folder in your project? Do any of them show they're not recognized?
  • Devid
    Devid almost 11 years
    @DaveRock after the repair i tried to uninstall Visual Studio Ultimate completely but at some point I again get the message that a .dll file could not be found or is missing and therefore Visual Studio could not uninstall completely. I have no References folder in my Project folders. Do you mean in Visual Studio the option under Project Add Reference ? I can't perform a system restore, but i was thinking to upgrade my Windows 7 to Windows 8.
  • Dave
    Dave almost 11 years
    Well, I think a re-install of the OS should fix all. In VS, under a project you should have a folder called References. Expand this and make sure there are icons to indicate an error/issue.
  • Devid
    Devid almost 11 years
    Under the project i can't find the folder References, this might be the problem.
  • Dave
    Dave almost 11 years
    @Devid What happens if you try to add a new reference?
  • Devid
    Devid almost 11 years
    @DaveRock i get the error: Package: 'ReferencePackageManager' failed to load.
  • Devid
    Devid almost 11 years
    I am not sure but i suspect the the NuGet package manager is causing the problem.
  • Dave
    Dave almost 11 years
  • Dave
    Dave almost 11 years
    Also, lots of details on Google for search phrase Package: 'ReferencePackageManager' failed to load
  • Devid
    Devid almost 11 years
    @DaveRock i did the thing in the video, also i checked google but nothing solved the problem. I will now upgrade to Windows 8 and see if the problem remains.