Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native Windows 0.65 support #170

Closed
tero-paananen opened this issue Sep 23, 2021 · 5 comments
Closed

React Native Windows 0.65 support #170

tero-paananen opened this issue Sep 23, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@tero-paananen
Copy link

Bug summary

React Native Windows 0.65 uses WinUI 2.6 https://github.com/microsoft/react-native-windows/releases/tag/react-native-windows_v0.65.0 and that conflicts to WinUI version used in this module <package id="Microsoft.UI.Xaml" version="2.3.191129002" targetFramework="native" />

I had to update version to 2.6 to get my project build. I got error like this microsoft/microsoft-ui-xaml#3017.

Library version

2.1.4

Environment info

$ npx react-native info
info Fetching system and libraries information...
System:
    OS: Windows 10 10.0.19043
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
    Memory: 20.31 GB / 31.90 GB
  Binaries:
    Node: 12.22.5 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.14.14 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK:
      AllowDevelopmentWithoutDevLicense: Enabled
      AllowAllTrustedApps: Enabled
      Versions: 10.0.14393.0, 10.0.18362.0, 10.0.19041.0
  IDEs:
    Android Studio: Not Found
    Visual Studio: 16.11.31624.102 (Visual Studio Community 2019)
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: Not Found
    react-native: 0.65.1 => 0.65.1
    react-native-windows: 0.65.2 => 0.65.2
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

Reproducible sample code

Try use module with react-native-windows 0.65.x
@tero-paananen tero-paananen added the bug Something isn't working label Sep 23, 2021
@tero-paananen
Copy link
Author

tero-paananen commented Sep 23, 2021

react-native-localize+2.1.4.patch

diff --git a/node_modules/react-native-localize/windows/RNLocalize/RNLocalize.vcxproj b/node_modules/react-native-localize/windows/RNLocalize/RNLocalize.vcxproj
index f75eb49..c41ddf2 100644
--- a/node_modules/react-native-localize/windows/RNLocalize/RNLocalize.vcxproj
+++ b/node_modules/react-native-localize/windows/RNLocalize/RNLocalize.vcxproj
@@ -146,7 +146,7 @@
   </Target>
   <ImportGroup Label="ExtensionTargets">
     <Import Project="$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets')" />
-    <Import Project="$(SolutionDir)\packages\Microsoft.UI.Xaml.2.3.191129002\build\native\Microsoft.UI.Xaml.targets" Condition="Exists('$(SolutionDir)\packages\Microsoft.UI.Xaml.2.3.191129002\build\native\Microsoft.UI.Xaml.targets')" />
+    <Import Project="$(SolutionDir)\packages\Microsoft.UI.Xaml.2.6.0\build\native\Microsoft.UI.Xaml.targets" Condition="Exists('$(SolutionDir)\packages\Microsoft.UI.Xaml.2.6.0\build\native\Microsoft.UI.Xaml.targets')" />
   </ImportGroup>
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
@@ -154,6 +154,6 @@
     </PropertyGroup>
     <Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props'))" />
     <Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets'))" />
-    <Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.UI.Xaml.2.3.191129002\build\native\Microsoft.UI.Xaml.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.UI.Xaml.2.3.191129002\build\native\Microsoft.UI.Xaml.targets'))" />
+    <Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.UI.Xaml.2.6.0\build\native\Microsoft.UI.Xaml.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.UI.Xaml.2.6.0\build\native\Microsoft.UI.Xaml.targets'))" />
   </Target>
 </Project>
\ No newline at end of file
diff --git a/node_modules/react-native-localize/windows/RNLocalize/packages.config b/node_modules/react-native-localize/windows/RNLocalize/packages.config
index 7ad3ffb..da28f86 100644
--- a/node_modules/react-native-localize/windows/RNLocalize/packages.config
+++ b/node_modules/react-native-localize/windows/RNLocalize/packages.config
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
+  <package id="Microsoft.UI.Xaml" version="2.6.0" targetFramework="native" />
   <package id="Microsoft.Windows.CppWinRT" version="2.0.200615.7" targetFramework="native" />
-  <package id="Microsoft.UI.Xaml" version="2.3.191129002" targetFramework="native" />
 </packages>
\ No newline at end of file
diff --git a/node_modules/react-native-localize/windows/RNLocalize/x64/Debug/RNLocalize.Build.CppClean.log b/node_modules/react-native-localize/windows/RNLocalize/x64/Debug/RNLocalize.Build.CppClean.log
new file mode 100644
index 0000000..e69de29
diff --git a/node_modules/react-native-localize/windows/RNLocalize/x64/Debug/RNLocalize.log b/node_modules/react-native-localize/windows/RNLocalize/x64/Debug/RNLocalize.log
new file mode 100644
index 0000000..5f28270
--- /dev/null
+++ b/node_modules/react-native-localize/windows/RNLocalize/x64/Debug/RNLocalize.log
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/node_modules/react-native-localize/windows/RNLocalize/x64/Debug/RNLocalize.vcxproj.FileListAbsolute.txt b/node_modules/react-native-localize/windows/RNLocalize/x64/Debug/RNLocalize.vcxproj.FileListAbsolute.txt
new file mode 100644
index 0000000..e69de29
diff --git a/node_modules/react-native-localize/windows/RNLocalize/x64/Debug/embed/embed.resfiles b/node_modules/react-native-localize/windows/RNLocalize/x64/Debug/embed/embed.resfiles
new file mode 100644
index 0000000..e69de29
diff --git a/node_modules/react-native-localize/windows/RNLocalize/x64/Debug/embed/embed.resfiles.intermediate b/node_modules/react-native-localize/windows/RNLocalize/x64/Debug/embed/embed.resfiles.intermediate
new file mode 100644
index 0000000..e69de29

@zoontek
Copy link
Owner

zoontek commented Sep 23, 2021

@tero-paananen Could you open a Pull request for it?

@tero-paananen
Copy link
Author

@tero-paananen Could you open a Pull request for it?

I will try on next week

@namrog84
Copy link
Contributor

We were running into the same issue. I submitted a PR to fix this as RNLocalize just doesn't even need or use the dependency.

@zoontek
Copy link
Owner

zoontek commented Sep 30, 2021

Fixed by the latest release. Thanks @namrog84 !

@zoontek zoontek closed this as completed Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants