[msvc] react-native-windows failed with warning C4864: expected 'template' keyword before dependent template name
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- cpp, react-native
- Domain
- build-system, operating-systems
Research direction
Start at vnext/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp around line 1799 and inspect the expression reported by MSVC warning C4864. Reproduce with the supplied msbuild command and Visual Studio 2026 toolset. Done means the x64 Release rebuild completes without C4864 being promoted to an error.
Written by the indexing model from the issue text.
Description
Problem Description
When build react-native-windows with VS2026 on windows, it failed with 'warning C4864: expected 'template' keyword before dependent template name', could you please take a look?
Failures:
C:\gitP\microsoft\react-native-windows\vnext\Microsoft.ReactNative\Fabric\Composition\CompositionContextHelper.cpp(1799,52): error C2220: the following warning is treated as an error [C:\gitP\microsoft\react-native-windows\vnext\Desktop\React.Windows.Desktop.vcxproj]
(compiling source file '../Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp')
C:\gitP\microsoft\react-native-windows\vnext\Microsoft.ReactNative\Fabric\Composition\CompositionContextHelper.cpp(1799,52): warning C4864: expected 'template' keyword before dependent template name [C:\gitP\microsoft\react-native-windows\vnext\Desktop\React.Windows.Desktop.vcxproj]
Steps To Reproduce
- git clone https://github.com/microsoft/react-native-windows and checkout 883b2f4
- cd /d C:\gitP\microsoft\react-native-windows
- msbuild /m /restore /p:PlatformToolset=v145 /p:Platform=x64 /p:Configuration=Release /p:WindowsTargetPlatformVersion=10.0.26100.0 /p:PublishToolDuringBuild=true /p:RestoreLockedMode=true /p:RestoreForceEvaluate=true /p:VisualStudioVersion="18.0" vnext\ReactWindows-Desktop.sln /t:Rebuild
Expected Results
It builds successfully.
CLI version
20.0.0
Environment
nfo Fetching system and libraries information...
System:
OS: Windows 11 10.0.26200
CPU: (16) x64 Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
Memory: 48.74 GB / 63.95 GB
Binaries:
Node:
version: 20.19.4
path: C:\Program Files\nodejs\node.EXE
Yarn:
version: 4.13.0
path: C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm:
version: 10.8.2
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Not Found
Visual Studio:
- 18.7.12002.237 (Visual Studio Enterprise 2026)
Languages:
Java: Not Found
Ruby:
version: 3.1.3
path: C:\tools\ruby31\bin\ruby.EXE
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 19.2.3
wanted: 19.2.3
react-native:
installed: 0.85.0-nightly-20260303-c26dbe286
wanted: 0.85.0-nightly-20260303-c26dbe286
react-native-windows: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Community Modules
No response
Target React Native Architecture
None
Target Platform Version
amd64
Visual Studio Version
2026
Build Configuration
x64, Release
Snack, code example, screenshot, or link to a repository
No response
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/react-native-windows
-
Fabric text is drawn with ClearType onto transparent composition surfaces, fringing thin glyphs OpenNeeds: Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
microsoft/react-native-windows#16340 ·
-
Needs: Triage :mag:
Difficulty 5/5 Over a week Newbie friendliness 30/100
microsoft/react-native-windows#16442 · 1 comment ·
-
Fabric: activating the window doesn't announce the window or the focused control to a screen reader OpenNeeds: Triage :mag:
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/react-native-windows#16435 ·
-
bug Needs: Triage :mag:
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/react-native-windows#16410 ·
-
bug Invalid Triage Needs: Triage :mag:
Difficulty 4/5 3-5 days Newbie friendliness 55/100
microsoft/react-native-windows#16368 ·
All issues in microsoft/react-native-windows
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
infiniflow/infinity#3502 ·