Skip to content

DebugBundle/ReleaseBundle configuration timing issue in C# template #3395

@kmelmon

Description

@kmelmon

With the addition of DebugBundle/ReleaseBundle configurations, we now have the ability to produce an offline bundle. This is working pretty nicely for the C++ template, but for the C# template there's a timing issue in the build that we should fix.

The problem here is that C# project files don't have custom build steps. Instead they have PreBuild/PostBuild which have fewer capabilities and I personally found to be buggy/unreliable. What was done instead was to add a C++ "dummy" BundleBuilder project that just runs a custom build step, which runs the bundle command. This created a timing issue in the build, where sometimes (particularly on the very first build), the bundle isn't copied into the output directory, which makes the app crash on launch, as it can't find the bundle.

Strangely, enabling mixed mode debugging makes the problem go away as a delay is introduced between building the BundleBuilder project and deploying the app. So this is clearly a timing problem.

This needs to be made reliable somehow. Ideas:
-Run the bundle command as a separate step outside of VS
-Look into other ways to make a C# project run a custom build step.

This isn't critical for M3 as we expect most people to use the default template, and there is a workaround, but we should eventually address this.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions