Project Cannot Be Compiled

I had two “version” installed of Xojo, 2020 Release 2 and 2020 Release 2.1 (on macOS Big Sur). I tried to learn Xojo in the last days with Release 2.1. Today I deleted Release 2 and now I get the following error message while running already developed projects:

“Project Cannot Be Compiled” - “Duplicate project item (i.e. same name): App”.

Any hints or tips how to resolve this problem? Thanks in advance.

Deleting an old version of Xojo shouldn’t cause this. Make sure you don’t have two items named “App” in the navigator pane on the left.

@Anthony_G_Cyphers, yes, you were right. I had to items named “App”. How may this happened?

Now I have deleted one, and now I get new error messages during compilation:

“MeinMenuBar.FileMenu.FileQuit (property name) - Issue: Type “App” has no member name “kFileQuit” Name”

I’ve never worked with the “FileMenu”. I’m still learning the basics of Xojo. So no plan how “kFileQuit” has been involved in my code.

Undo the delete, and delete the other instance.

There are two “App” items: One as a blue cube, and one as a small desktop. The last one I cannot delete. If I delete the first one, I get the mentioned error messages :-/

OK. I’m not sure how it happened, but there are Constants on the default App object that Xojo adds to each desktop project for the MenuItems in the MenuBar. Check the one you can delete for these constants, if it has them, copy them to the other one then delete the one you can.

Alternatively, you could start a new project and copy your other items (windows, modules, etc) to that.

I see. I created a new project and I see the constants right in the scope of the “App” as “greek Pi - Constants”. In the errorneous project they does not exist. I copy & paste it from the “new project” to the “old project”. Now the project compiles and I’m able to build it.

But now I have a totally strange behavior: Every project I have in the same folder “links” to he corrected project above. I’m totally lost.

Are you saving multiple projects in text format to the same folder? If so, that’s a big no-no and likely caused the original issue.

I save them as “Xojo Project”. Is this the text format?

Yes, that’s the text project type.

Aaaaaaaaaaaaaaaargh. So I need for each text-format-saved project a different folder?

Is this necessary for the binary-format of for the XML-format, too?

Yes, otherwise portions of each project will be overwritten by saves from the other projects in that directory.

No. These are flat-file formats, but not ideal for source code repositories.

1 Like