Closed Hareesh-S-T closed 3 months ago
That's great it worked😄! I also had the same issue, but I tested it on react-native-windows@0.72.8 version and it worked perfectly.
Edit - After digging through a few closed issues, moving the folder to my desktop, the project is building, so it seems to be related to the path being too long, even though I have run the dependencies script and enabled long path support. Any workaround to this?
It looks like you've worked around this by moving your project into a shorter path?
This may be similar to the MIDL tool's path length limitations (256 regardless of long path support): #10414. Unfortunately the build tools we use codegen some rather long file names which can cause issues if your project's root folder is already long.
If I'm reading this right, everyone on the thread is unblocked? Closing.
Problem Description
Visual Studio Build Tools 2019 - 16.11.30 Visual Studio Community 2022 - 17.7.4 NodeJS - 20.5.1 JDK - 20.0.1 React Native - 0.72.4
After initializing a new RN project and installing the React-Native for Windows packages, running on UWP fails with the following error -
× Building Solution: C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\XamlCompiler\Microsoft.Windows.UI.X... × Build failed with message ...\node_modules\react-native-windows\build\x64\Debug\Microsoft.ReactNative\Generated Files\winrt\Windows.UI.Xaml.h(14,10): fatal error C1083: Cannot open include file: 'winrt/impl/Windows.ApplicationModel.DataTransfer.DragDrop.2.h': No such file or directory
--logging gives me the following -
fatal error C1083: Cannot open include file: 'winrt/impl/Windows .ApplicationModel.DataTransfer.DragDrop.2.h': No such file or directory C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\XamlCompiler\Microsoft.Windows.UI.Xaml.Common.targets(486,5): error MSB4181: The "CompileXaml " task returned false but did not log an error.
I was able to successfully build a RNW test project a few weeks back to check, but cannot now
Edit - After digging through a few closed issues, moving the folder to my desktop, the project is building, so it seems to be related to the path being too long, even though I have run the dependencies script and enabled long path support. Any workaround to this?
Steps To Reproduce
"npx react-native init xxxx" "npx react-native-windows-init --overwrite" inside project directory "npx react-native run-windows"
Expected Results
Application to build successfully, and blank/template project to run
CLI version
11.3.6
Environment
Target Platform Version
None
Target Device(s)
Desktop
Visual Studio Version
Visual Studio 2022
Build Configuration
None
Snack, code example, screenshot, or link to a repository
No response