Skip to content

Commit 4d94242

Browse files
authored
fix(windows): fix random Windows build failure (#1235)
1 parent 72cdacf commit 4d94242

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

windows/test-app.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,21 @@ function generateSolution(destPath, { autolink, useHermes, useNuGet }) {
713713
});
714714
}
715715

716+
// TODO: Remove when we drop support for 0.69.
717+
// Patch building with Visual Studio 2022. For more details, see
718+
// https://github.com/microsoft/react-native-windows/pull/10373
719+
if (rnWindowsVersionNumber < 7000) {
720+
const helpers = path.join(
721+
rnWindowsPath,
722+
"Microsoft.ReactNative",
723+
"Utils",
724+
"Helpers.h"
725+
);
726+
copyAndReplace(helpers, helpers, {
727+
"inline typename T asEnum": "inline T asEnum",
728+
});
729+
}
730+
716731
if (useNuGet) {
717732
const nugetConfigPath =
718733
findNearest(

0 commit comments

Comments
 (0)