[BUG] Generating Project files fails after building a Content Only game

I created a content only project, which I made a Shipping build for iOS (for TestFlight testing). Then I tried to add C++ code to the project, but then code project file generation failed with the error: “namespace global::” already has a definition for [ProjectName]Target.

The issue was that there was already a [ProjectName]Target.cs file in the Intermediate folder, presumably from the initial Content Only Shipping Build.

Deleting the [ProjectName]Target.cs file in the Intermediate folder, and regenerating project files, fixed the issue. I just wanted to report the error, and request that the error in the Terminal/Output Log suggests checking the Intermediate folder for duplicate files.

Thanks!

Hello JonathanADaley,

After creating a new blank content only project and packaging it for iOS, there don’t seem to be any .cs files in the Intermediates folder. As such, adding a C++ class afterwards succeeded without any issues. Do you have any additional plugins enabled in your project that may of added this file that was causing these issues?

We haven’t heard from you in a while, JonathanADaley. Are you still experiencing this issue? If so, could you provide the information I requested? In the meantime, I’ll be marking this issue as resolved for tracking purposes.