react-native-svg icon indicating copy to clipboard operation
react-native-svg copied to clipboard

Windows Release builds failing due to missing deps (Patch File Fix)

Open mat2718 opened this issue 1 year ago • 1 comments

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

when building for release on react native windows this library fails due to missing dependencies that are listed for Debug but not in Release. this patch just adds the dependencies for release as well enabling a successful build. 😄 hope this helps!!

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-svg/windows/RNSVG/RNSVG.vcxproj b/node_modules/react-native-svg/windows/RNSVG/RNSVG.vcxproj
index 11ad6f5..bd96537 100644
--- a/node_modules/react-native-svg/windows/RNSVG/RNSVG.vcxproj
+++ b/node_modules/react-native-svg/windows/RNSVG/RNSVG.vcxproj
@@ -120,6 +120,9 @@
     <ClCompile>
       <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
+    <Link>
+      <AdditionalDependencies>dxguid.lib;WindowsApp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
     <ClInclude Include="BrushView.h" />

This issue body was partially generated by patch-package.

mat2718 avatar Feb 01 '24 14:02 mat2718

bump, this works and is needed for windows support

afonso-tsx avatar Feb 28 '24 08:02 afonso-tsx

Hello @mat2718, As I see it was already implemented. Thank you.

bohdanprog avatar Jun 13 '24 07:06 bohdanprog