Why Visual Studio 2015 can't run exe file (ucrtbased.dll)?

后端 未结 6 901
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-23 10:52

I have installed the Visual Studio 2015 and created Win32 project with some code. I compiled it successfully, but I can\'t launch exe file, because I don\'t have some ucrtba

相关标签:
6条回答
  • 2020-12-23 11:33

    I would like to suggest additional solution to fix this issue. So, I recommend to reinstall/install the latest Windows SDK. In my case it has helped me to fix the issue when using Qt with MSVC compiler to debug a program.

    0 讨论(0)
  • 2020-12-23 11:35

    I am not sure it will help but you can try this.This worked for me

    Start -> Visual Studio Installer -> Repair

    after this enable the Microsoft Symbols Server under

    TOOLS->Options->Debugging->Symbols

    This will automatically set all the issues.

    You can refer this link as well

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/6aa917e5-a51c-4399-9712-4b9c5d65fabf/ucrtbasedpdb-not-loaded-using-visual-studio?forum=visualstudiogeneral

    0 讨论(0)
  • rdtsc solution did not work for me.

    Firstly, I use Visual Studio 2015 Express, for which installer "modify" query does not propose any "Common Tools for Visual C++ 2015" option you could uncheck.

    Secondly, even after 2 uninstall/reinstall (many hours waiting for them to complete...), the problem still remains.

    I finally fixed the issue by reinstalling the whole Windows SDK from a standalone installer (independently from Visual C++ 2015 install): https://developer.microsoft.com/fr-fr/windows/downloads/windows-8-1-sdk or https://developer.microsoft.com/fr-fr/windows/downloads/windows-10-sdk

    This fixed the issue for me.

    0 讨论(0)
  • 2020-12-23 11:44

    The problem was solved by reinstalling Visual Studio 2015.

    0 讨论(0)
  • 2020-12-23 11:49

    This problem is from VS 2015 silently failing to copy ucrtbased.dll (debug) and ucrtbase.dll (release) into the appropriate system folders during the installation of Visual Studio. (Or you did not select "Common Tools for Visual C++ 2015" during installation.) This is why reinstalling may help. However, reinstalling is an extreme measure... this can be fixed without a complete reinstall.

    First, if you don't really care about the underlying problem and just want to get this one project working quickly, then here is a fast solution: just copy ucrtbased.dll from C:\Program Files (x86)\Windows Kits\10\bin\x86\ucrt\ucrtbased.dll (for 32bit debug) into your application's \debug directory alongside the executable. Then it WILL be found and the error will go away. But, this will only work for this one project.

    A more permanent solution is to get ucrtbased.dll and ucrtbase.dll into the correct system folders. Now we could start copying these files into \Windows\System32 and \SysWOW64, and it might fix the problem. However, this isn't the best solution. There was a reason this failed in the first place, and forcing the use of specific .dll's this way could cause problems.

    The best solution is to open up the control panel --> Programs and Features --> Microsoft Visual Studio 2015 --> Modify. Then uncheck and re-check "Visual C++ --> Common Tools for Visual C++ 2015". Click Next, then and click Update, and after a few minutes, it should be working.

    If it still doesn't work, run the modify tool again, uncheck the "Common Tools for Visual C++ 2015", and apply to uninstall that component. Then run again, check it, and apply to reinstall. Make sure anti-virus is disabled, no other tasks are open, etc. and it should work. This is the best way to ensure that these files are copied exactly where they should be.

    Note that if the modify tool gives an error code at this point, then the problem is almost certainly specific to your system. Research the error code to find what is going wrong and hopefully, how to fix it.

    0 讨论(0)
  • 2020-12-23 11:50

    An easy way to fix this issue is to do the following (click on images to zoom):

    Make sure to close Visual Studio, then go to your Windows Start -> Control Panel -> Programs and Features. Now do this:

    A Visual Studio window will open up. Here go on doing this:

    Select the checkbox for Common Tools for Visual C++ 2015 and install the update.

    The update may takes some time (~5-10 minutes). After Visual Studio was successfully updated, reopen your project and hit Ctrl + F5. Your project should now compile and run without any problems.

    0 讨论(0)
提交回复
热议问题