none
Failed to create empty document after building application with VS 2015

    Question

  • I recently upgraded our MFC application from VS 2010 to VS 2015.  When executing newly built MFC application, immediately are confronted with popup with message "Failed to create empty document".  Looking at event log, I see "Faulting module name: ucrtbase.DLL".  I can debug my MFC application down to the call ShowWindow().  I have not changed my code; only built it with VS 2015. 

    Would anyone know why I am now getting this error message?  Application seems to be properly linked to c:\windows\system32\mfc140.dll, c:\windows\system32\msvcrt.dll, c:\windows\system32\msvcp140.dll, c:\windows\system32\vcruntime140.dll, c:\windows\system32\ucrtbase.dll, as well as the new of newly named c:\windows\system32\api-ms-win*.dll files.

    Regards, Rob

    Monday, December 14, 2015 8:55 PM

Answers

  • Weiwei,

    (RESOLVED)

    Thanks for the response.  The problem came down to a wrongly named DLL that was trying to be loaded.  We previously used version numbers in our delivered product DLL's, and we have recently removed them with the latest product release.  We had code that was still attempting to load a DLL including the version number.

    I wished that we had received a better error message.  Using Depends, the Event log, and Process Monitor did not show the true error.

    Regards, Rob

    Wednesday, December 16, 2015 3:14 PM

All replies

  • Hi Robert Loureiro,

    Please create a new MFC application with VS2015 to make sure whether this problem is related to this specific project or all projects created by VS2015.

    If related to this specific project, please create a new project with VS2015 and then move the project from the origin project one by one to check which file caused this issue.

    Besides, there are two version of Visual Studio between VS2010 and VS2015. I suggest you upgrade your project with order of VS2010 -> VS2012 -> VS2013 -> VS2015.

    If related to all projects, it is related to Visual Studio 2015. Please try with following steps to troubleshoot this problem.

    1. Run Visual Studio 2015 as administrator.
    2. Run Visual Studio in safe mode with "Deven.exe /SafeMode" to prevents all third-party VSPackages from loading when Visual Studio starts, thus ensuring stable execution.
    3. Reset all settings of your VS2015 through menu Tools -> Import and Export settings -> Reset all settings.
    4. Repair your Visual Studio 2015.

    Best Regards,
    Weiwei

    Wednesday, December 16, 2015 7:23 AM
    Moderator
  • Weiwei,

    (RESOLVED)

    Thanks for the response.  The problem came down to a wrongly named DLL that was trying to be loaded.  We previously used version numbers in our delivered product DLL's, and we have recently removed them with the latest product release.  We had code that was still attempting to load a DLL including the version number.

    I wished that we had received a better error message.  Using Depends, the Event log, and Process Monitor did not show the true error.

    Regards, Rob

    Wednesday, December 16, 2015 3:14 PM
  • Hi Robert Loureiro,

    I'm glad that you have resolved your problem. Thanks for sharing your solution here. Please mark your reply as answer, which is benefit to other communities who has the same problem.

    If any question, please feel free to come back to our forum.

    Best Regards,
    Weiwei

    Thursday, December 17, 2015 3:27 AM
    Moderator