If you see the “The application has failed to start because its side-by-side configuration is incorrect
” error when trying to start an app in Windows, this means that the program cannot start due to missing dependencies. The components required to run the app are damaged or not installed on the computer. In this article, we’ll show how to check an application’s manifest file and resolve dependencies by finding a library or a package to be installed in order for the app to start correctly.
How to Analyze an App Manifest in Windows?
Let’s try to start the makeappx.exe
application on a computer having no Windows SDK installed.
Obviously, the tool doesn’t start and returns an error:
Program 'makeappx.exe' failed to run: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail + CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException + FullyQualifiedErrorId : NativeCommandFailed
Note the ResourceUnavailable message, it directly points to the fact that the app is missing something to run.
The list of components and libraries an app needs to run is specified in the app manifest. The app manifest may be stored as a separate XML file or embedded directly into the application’s executable (.exe) file.
You can view the EXE file manifest using the free Manifest View or Resource Hacker tool.
As you can see, the Dependency section in the app manifest contains a reference to the Microsoft.Windows.Build.Appx.AppxPackaging.dll. The application cannot work without this library file.
You can also trace application startup using the SxSTrace.exe.
Open a new command prompt and start data collection using the command :
sxstrace.exe Trace -logfile:c:\tmp\makeapp_sxtracesxs.etl
Tracing started. Trace will be saved to file c:\tmp\makeapp_sxtracesxs.etl. Press Enter to stop tracing...
Then run the problem app. When the “The application has failed to start because its side-by-side configuration is incorrect
” error appears, stop the tracing by pressing ENTER in the sxstrace window.
Convert the ETL log file into a more convenient TXT format:
sxstrace.exe Parse -logfile:c:\tmp\makeapp_sxtracesxs.etl -outfile:c:\tmp\makeapp_sxtracesxs.txt
Open the resulting TXT file in the Notepad (or any other text editor) and find the lines with errors. You can also grep for errors in the text file with PowerShell
Get-Content c:\tmp\makeapp_sxtracesxs.txt | Where-Object { $_.Contains("ERROR") }
As you can see, the error points to the same DLL file shown in the app manifest:
INFO: End assembly probing. ERROR: Cannot resolve reference Microsoft.Windows.Build.Appx.AppxPackaging.dll,version="0.0.0.0". ERROR: Activation Context generation failed.
Additionally, you can analyze the SideBySide dependency errors with the event logs. If the error occurs, the following event is written to the Application log:
EventID: 33 Source: SideBySide
The error description mentions a library file or a component necessary to run an app.
Activation context generation failed for "C:\ps\test\makeappx.exe". Dependent Assembly Microsoft.Windows.Build.Appx.AppxPackaging.dll,version="0.0.0.0" could not be found. Please use sxstrace.exe for detailed diagnosis.
Then open Google and search for information on this dll. In my example, the library file is a part of the MSIX Toolkit from Windows SDK (Redist.x86). Download and install the components you have found to let the app start correctly.
Microsoft Visual C++ Redistributable Troubleshooting
In most cases, the “incorrect side-by-side configuration” error is related to a missing or corrupted version of the Microsoft Visual C++ Redistributable library.
In this case, the following error will appear both in sxstrace log and in the app manifest:
Error: Cannot resolve reference ERROR: Cannot resolve reference Microsoft.VC90.MFC, processorArchitecture="amd64", publicKeyToken="1fc8b3b9a1e18e3b", type="win32",version="9.0.21022.8".
We get the following information from this message: the app needs a x64-bit Microsoft.VC90.MFC 9.0.21022. A quick search in Google shows that it is Microsoft Visual C++ 2008 Redistributable. Download and install this MVC version from the Microsoft website.
In the same way, you can get other Microsoft Visual C++ versions by their values in the Version field:
Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017, and 2019. | 14.0.x or newer |
Microsoft Visual C++ 2013 Redistributable | 12.0.x |
Microsoft Visual C++ 2012 Redistributable | 11.0.x |
Microsoft Visual C++ 2010 Redistributable | 10.0.x |
Microsoft Visual C++ 2008 Redistributable | 9.0.x |
Repair System Files in Windows
If you understand that the app startup error is related to one of Windows system files, check and repair Windows system image files and components using SFC and DISM:
sfc /scannow
DISM.exe /Online /Cleanup-image /Scanhealth
DISM.exe /Online /Cleanup-image /Restorehealth