The Application has failed to start because

Has anyone ever received this execution error:

“The application has failed to start because its side-by-side configuration is incorrect”

Neither Debug execution, not .exe launch will start the app and display its initial window.

In the event viewer, there’s this note about the launch:

Activation context generation failed for “C:\Users\SMG\dev\myTestApp.exe”.Error in manifest or policy file “C:\Users\SMG\dev\myTestApp.exe” on line 2. Invalid Xml syntax.

I didn’t see any other Xojo postings on the forum related to this.

Try including the runtime dll’s - the setting is under Build Settings->Windows in the advanced tab (gear icon).

It might be that you have entered an invalid value somewhere in the Version section of your Shared settings for the app, see screenshot and ensure that they are 65535 or less.

This has been reported <https://xojo.com/issue/49395> since August 2017 and is now archived…

@Wayne_Golding – I was looking for that option – but it’s NOT PRESENT. Perhaps it’s not available for this project (which was newly created).

I looked at another of my 64-bit only projects, and it WAS available on that project (though not turned on!) That project was created a few years ago.

ALSO – I’m running under Windows 10, with Visual Studio 2019 installed. It looks like I have the 2019 Redistributable Update, but NOT the 2019 C++ Redistributable MSMs. I also have Visual Studio 2022 installed – maybe there’s some conflict between those two installations.

Mine are set to 1 (major), 0 (minor), 0 (bug version)…

It should be, see screenshot:

  1. What version of xojo are you using?
  2. What OS and version are you running this on?
  3. Does this happen on a brand new project?
  4. Have you tried rerunning the runtime redistributable inside C:\Program Files\Xojo\Xojo 2021r3.1\Extras\Windows Runtime\Installers\vc_redist.x64.exe and vc_redist.x86.exe

@JulianS – It’s really NOT at the top of that window.

Xojo version = 2021 Release 3.1
OS = Windows 10 Pro, build 19044.1466

Yes – this is a brand new project! I am literally about to test making calls into a DLL with a SINGLE push button in the default window. I’ve commented out all four lines referring to my DLL to make sure that’s not involved.

Have you tried rerunning the runtime redistributable inside C:\Program Files\Xojo\Xojo 2021r3.1\Extras\Windows Runtime\Installers\vc_redist.x64.exe and vc_redist.x86.exe

Yes. When I just tried that:

Can you screenshot the whole window so I can see if there is anything obvious that might be different?
Could you upload the project as a binary for me to check here?

Yep, here’s some screenshots:

Here’s a .zip of the project file: link

Ok a couple of things.

  1. You can’t have an & in the app name, there should really be a check for that, this will stop the exe launching in the debugger and will be the cause of the error message above.

  2. You need to make a new project, that one is now broken because of the renaming of the Super on the App to empty then back to a valid value. There is a way to get the App entry into a state where its no longer an actual App item and it thinks its a Class (hence the blue cube icon). When this happens the Include Runtime DLL’s option vanishes.

1 Like

@JulianS – Wow. You nailed it. I just changed that & to “and” and it just RAN, both in the debugger and as an executable! What / why is the & character not permitted on Windows? Or is it a Xojo issue?

So do you think I even need to remake the project then?

Thank you! I’m grateful for your persistence!

Technically it should work, windows should allow it as & is not in the list of disallowed characters for filenames, so I assume its a Xojo issue, I’ve not checked feedback to see if its been reported already.

Personally, I’d quickly make a new project to fix the App issue, you’ll notice the difference in the icons as soon as you make the new project. There is a way to get it back to an App icon, but I wouldn’t really trust it going forward as its so quick to make a new project.

  1. Select App in left nav
  2. Delete the text from Super in the inspector and press enter to confirm
  3. Type in Application and hit enter - this should move it back to the correct item
  4. Select the text again and change it to DesktopApplication and hit enter

This should put the App entry back into correct “type”, confirm by checking the icon against a new projects App icon.

Might it work if & became && ?

IIRC this is what one is supposed to do inside Xojo apps although I forget why, exactly.

& is a special character in XML.
It indicates ‘here comes a code’
The XML for & for example, is &amp
< is used in XML, so if you want to include it in actual text, it becomes &lt

&& is used in some places for Windows , notably menu shortcut characters and buttons, where you want pressing H to activate a menu that displays Help with the H underlined.
The & indicates which letter is underlined and active.
It is invisible.
To have one become visible, you use && there.

& is a special character in XML.

True, but you’re supposed to parse your text and do those substitutions prior to sending the text to XML. OR, if the text is being submitted to an OS API function, then the OS should parse and do the substitutions. At least that’s the way we handle it on MacOS.

@JulianS

I think you’re right about needing to remake the project, because although after step #3 the icon to the left of App is now the correct Application icon:

image

image

…once “Application” is selected, we need to both erase that field (again) and move OUT of the field in order to be able to select “DesktopApplication” as super. But even doing so, the proper icon is not displayed – and neither are the default appearance options displayed (Default Window, Menu Bar, Icon).

So that would indicate a Xojo bug. I wonder if the XML of a damaged project could be compared against the XML of an undamaged project, in order to determine what is broken – maybe there’s a way to edit the project XML to repair this class of problem. I ask because had my project not been so tiny, remaking it wouldn’t be so easy.

Glad to see you solved the fail to star problem. As a side note, FORGET everithing you knew about redistributables, Xojo did some questionable choises that lead to some kind of DDLHELL. You are going to find some PCs with that kind of error (setup failed) and imposible to install the runtime so, No Xojo apps. Just mark the option to include the runtime files in the build folder and your apps wre going to run without needing a runtime install.