react-native-vector-icons
react-native-vector-icons copied to clipboard
Linking to windows - no add as link option
- :ballot_box_with_check: Review the documentation: https://github.com/oblador/react-native-vector-icons
- :ballot_box_with_check: Search for existing issues (including closed ones): https://github.com/oblador/react-native-vector-icons/issues
Environment
OS: windows 10 target platform: windows Visual Studio Version: Microsoft Visual Studio Community 2019 Version 16.5.4 react-native version: 0.60 react-native-windows version: 0.60 react-native-vector-icons version: 6.6.0
Description
I can't follow the two last steps. There's no drop-down button on add and no "Copy to output directory" option.
:heavy_check_mark: Open your solution in Visual Studio, right click the Assets folder in your solution, click Add Existing.
:heavy_check_mark: Browse to the node_modules\react-native-vector-icons\Fonts folder, select the required font files
:x: Click the Add drop-down and select Add as Link.
:x: Set Copy To Output Directory property of each font file to Copy if newer
Icons are just a rectangle for me.
Is there an even more manual way of doing it?
Same here, no Add as Link option on VS 2019
Has anyone been able to solve it?
Also need a solution for this!
However, It shouldnt be a strong difference if you add an Asset as a Link or add the file itself. Adding the file to the asset folder doesnt resolve the issue though. Would be good to have some input here on how to link properly.
Same issue here, currently only work if you manual install the font in your device
anyone figured this out?
+1 here, the option is missing and all icons render as a square even when adding the file itself to assets.
https://github.com/oblador/react-native-vector-icons/issues/1237
That worked for me! Thanks @exotexot.
For everyone else, what I did was copy the desired fonts to the assets folder within /windows/project-name.
From there, I entered the project solution, right-clicked on Assets and pressed Add > Existing Item and selected the fonts I copied into /windows/project-name/assets.
It worked on the next build (Both VS and via npx if anyone wants to be sure).
If others can confirm this worked, I'll make a pull request to the project to update this. @capc0 @LeeJiaLe
I can confirm that copying the files into the Assets folder is working
@alexanderblackh copying the files over also worked for me, an update to the docs would be very appreciated! :)
Would also like to note, this only seemed to help w/ default FontAwesome (4?) icons, when I tried to use any FontAwesome5 icons, still shows as unknown font.
@alexanderblackh was this also the case for you, I saw you had FA5 in your folder screenshot. Were you able to get it working?
@alexanderblackh copying the files over also worked for me, an update to the docs would be very appreciated! :)
Would also like to note, this only seemed to help w/ default FontAwesome (4?) icons, when I tried to use any FontAwesome5 icons, still shows as unknown font.
@alexanderblackh was this also the case for you, I saw you had FA5 in your folder screenshot. Were you able to get it working?
Sorry for the delay in response. FA5 is added but it's not working, only getting FA4 working.
@alexanderblackh copying the files over also worked for me, an update to the docs would be very appreciated! :) Would also like to note, this only seemed to help w/ default FontAwesome (4?) icons, when I tried to use any FontAwesome5 icons, still shows as unknown font. @alexanderblackh was this also the case for you, I saw you had FA5 in your folder screenshot. Were you able to get it working?
Sorry for the delay in response. FA5 is added but it's not working, only getting FA4 working.
same here on RN 0.64
Is there any way to achieve this without using Visual Studio? I tried using Visual Studio 2022, and it has been a mess for me (most of the options you mention seems not to be available, afaik).
yes for me too the same issue. there is no add to existing items option in visual studio 2022