CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: "Side-by-side configuration is incorrect"

  1. #1
    Join Date
    Jan 2008

    "Side-by-side configuration is incorrect"

    I'm starting a pretty basic C++ DirectX program. All it does it define and show a simple empty window with a title. It works for me, but when I try to run it on other computers, I get "Side-by-side configuration is incorrect, program cannot run" or something like that. I'm using Visual C++ 2008 Express.

    Here's my source:
    #include <windows.h>
    #include <windowsx.h>
    // the WindowProc function prototype
                             UINT message,
                             WPARAM wParam,
                             LPARAM lParam);
    // the entry point for any Windows program
    int WINAPI WinMain(HINSTANCE hInstance,
                       HINSTANCE hPrevInstance,
                       LPSTR lpCmdLine,
                       int nCmdShow)
        // the handle for the window, filled by a function
        HWND hWnd;
        // this struct holds information for the window class
        WNDCLASSEX wc;
        // clear out the window class for use
        ZeroMemory(&wc, sizeof(WNDCLASSEX));
        // fill in the struct with the needed information
        wc.cbSize = sizeof(WNDCLASSEX);
        wc.style = CS_HREDRAW | CS_VREDRAW;
        wc.lpfnWndProc = (WNDPROC)WindowProc;
        wc.hInstance = hInstance;
        wc.hCursor = LoadCursor(NULL, IDC_ARROW);
        wc.hbrBackground = (HBRUSH)COLOR_WINDOW;
        wc.lpszClassName = L"WindowClass1";
        // register the window class
        // create the window and use the result as the handle
        hWnd = CreateWindowEx(NULL,
                              L"WindowClass1",    // name of the window class
                              L"Flux Online",    // title of the window
                              WS_OVERLAPPEDWINDOW,    // window style
                              300,    // x-position of the window
                              300,    // y-position of the window
                              500,    // width of the window
                              400,    // height of the window
                              NULL,    // we have no parent window, NULL
                              NULL,    // we aren't using menus, NULL
                              hInstance,    // application handle
                              NULL);    // used with multiple windows, NULL
        // display the window on the screen
        ShowWindow(hWnd, nCmdShow);
        // enter the main loop:
        // this struct holds Windows event messages
        MSG msg;
        // Enter the infinite message loop
              // find out the starting time of each loop
              DWORD starting_point = GetTickCount();
              // Check to see if any messages are waiting in the queue
              if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
                  // If the message is WM_QUIT, exit the while loop
                  if (msg.message == WM_QUIT)
                  // translate keystroke messages into the right format
                  // send the message to the WindowProc function
              // Run game code here
              // ...
              // ...
              // wait until 1/40th of a second has passed
              while ((GetTickCount() - starting_point) < 25);
        // return this part of the WM_QUIT message to Windows
        return msg.wParam;
    // this is the main message handler for the program
    LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
        // sort through and find what code to run for the message given
            // this message is read when the window is closed
            case WM_DESTROY:
                    // close the application entirely
                    return 0;
                } break;
        // Handle any messages the switch statement didn't
        return DefWindowProc (hWnd, message, wParam, lParam);

  2. #2
    Join Date
    Apr 1999

    Re: "Side-by-side configuration is incorrect"

    This might help.
    Gort...Klaatu, Barada Nikto!

  3. #3
    Join Date
    Jan 2008

    Re: "Side-by-side configuration is incorrect"

    Didn't help

    Thanks though...

  4. #4
    Join Date
    Sep 2002

    Re: "Side-by-side configuration is incorrect"

    You need to install VC++ 2008 runtime redistributable package on other PCs which doesn't have VC 2008 installed.

    Microsoft Visual C++ 2008 Redistributable Package (x86)

  5. #5
    Join Date
    Jan 2008

    Re: "Side-by-side configuration is incorrect"

    Wait, so how do I compile this so that it will run on any computer that doesn't have MSVC++ 2008 or the redistributable package?

  6. #6
    Join Date
    Aug 2005

    Re: "Side-by-side configuration is incorrect"

    Quote Originally Posted by Kremlin
    Wait, so how do I compile this so that it will run on any computer that doesn't have MSVC++ 2008 or the redistributable package?
    change your project settings to not use the runtime library, but this will make the output exe bigger.

    Project Properties -> C/C++ -> Code Generation -> Runtime Library -> use/MT or /MTd depends on your current configuration.

  7. #7
    Join Date
    Oct 2006

    Thumbs up Re: "Side-by-side configuration is incorrect"

    Side by side configuration will comes in picture, if we are buiding an application with later version of an assembly, and our client machine doesnt have this.

    Please go to event viewer windows and check widows event view.
    There should be an entry with sidebyside.From that we can see which reference assembly is missing
    for Eg.

    "Activation context generation failed for "\\machine_sha\share\exe\release\SwitchConfig.exe". Dependent Assembly Microsoft.VC90.MFC,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis."

    This means that particular version of the assembly file is missing from C:\Windows\WinSxs Folder.
    We need to install microsoft redistributable package here
    Download from
    Then reboot the PC.The application will start working now.

    If you are running VS2005, redistributable package is available in



    Install this and reboot PC, application will start working.

    Usage of sxstrace.exe is as follows
    Start VS command prompt(start->all programs->Microsoft visual studio 2008->visual studio tools->
    command prompt)

    Usage: SxsTrace [Options]
    Trace -logfile:FileName [-nostop]
    Enabling tracing for sxs.
    Tracing log is saved to FileName.
    If -nostop is specified, will not prompt to stop tracing.
    Parse -logfile:FileName -outfile:ParsedFile [-filter:AppName]
    Translate the raw trace file into a human readable format and save the re
    sult to ParsedFile.
    Use -filter option to filter the output.
    Stop the trace if it is not stopped before.
    Example: SxsTrace Trace -logfile:SxsTrace.etl
    SxsTrace Parse -logfile:SxsTrace.etl -outfile:SxsTrace.txts

    John Samuel

  8. #8
    Join Date
    Oct 2006

    Re: "Side-by-side configuration is incorrect"

    Sxtrace.exe is useful for identifying side by side configuration error

  9. #9
    Join Date
    Sep 2010

    Re: "Side-by-side configuration is incorrect"

    To me this error just came up when writing a plugin for Maya.
    I've compiled it, and on my machine it works great, however on other machines (same maya-version, same system) it doesn't, and I'm getting:
    // Error: line 1: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail.

    I was a little confused about a few things mentioned here - about the patch for Microsoft Visual Studio 2005 (http://www.microsoft.com/downloads/d...2-9112bab119c2 ), do I have to install that, or the person that wants to use the plugin (where this error comes up)?

    I tried installing the patch on my computer, however there seems to be a mistake that the install suddenly breaks up without any error message..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)