Open SireeshaThota opened 4 years ago
I wonder if this is an issue with apps that have a - in the name? Maybe we need to sanitize the app name as part of app generation.
Yes i understood now. It is because of - in the name. When i change it, i could build it successfully.
If i remove "-" in the name of the project, project is building successfully. But i think it should be supported.
Agreed that "-" in app name should either be fixed to be supported or at the very least give better errors if that's unfixable (but it should be).
react-native init
does not support dashes in the app name - it errors if you try.
We could protect ourselves against people that skirt that, but what is the exact sanitation that we want to apply?
The app name is used all over the template (file names, variables, namespaces, native and JS code) and doing the wrong thing means the app won't compile or won't load.
I'm currently fixing the new module templates (#6065) to follow the naming logic of create-react-native-module
because that's the official way to create modules and it converts everything to PascalCase in the ios/android templates.
Hello @acoates-ms how did you manage to remove the "-" from the name.. Because app name is available in all the project already.
Can we create windows app with existing react-native application. I was trying to do the same. I am getting following errors.
Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.18362.0\windows.ui.xaml.core.direct.xamldirectcontract\2.0.0.0\windows.ui.xaml.core.direct.xamldirectcontract.winmd 9>D:\MCD\MCDSource\gvc-react-native\windows\gvc-react-native\App.idl(1): error MIDL2025: [msg]syntax error [context]: expecting { near "-" [D:\MCD\MCDSource\gvc-react-native\windows\gvc-react-native\gvc-re act-native.vcxproj] 9>D:\MCD\MCDSource\gvc-react-native\windows\gvc-react-native\App.idl(2): error MIDL2026: [msg]cannot recover from earlier syntax errors; aborting compilation [D:\MCD\MCDSource\gvc-react-native\windows\gvc- react-native\gvc-react-native.vcxproj] 9>Done Building Project "D:\MCD\MCDSource\gvc-react-native\windows\gvc-react-native\gvc-react-native.vcxproj" (default targets) -- FAILED. 2>Done Building Project "D:\MCD\MCDSource\gvc-react-native\windows\gvc-react-native\gvc-react-native.vcxproj.metaproj" (default targets) -- FAILED. 1>Done Building Project "D:\MCD\MCDSource\gvc-react-native\windows\gvc-react-native.sln" (default targets) -- FAILED.