Skip to content

Commit 19d5561

Browse files
authored
Upgrade nativemodule samples to 0.76 (#1001)
## Description Upgrades cppwinrt and csharp samples to 0.76. cpp-lib sample is already on 0.76 and does not need to be upgraded yet. ### Why Part of the 0.76 release. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/react-native-windows-samples/pull/1001)
1 parent 50c3333 commit 19d5561

File tree

10 files changed

+2965
-2752
lines changed

10 files changed

+2965
-2752
lines changed

samples/NativeModuleSample/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
These samples showcase building Native Modules for React Native for Windows. It includes implementations in [C#](./csharp/) and [C++/WinRT](./cppwinrt/).
44

5-
Both implementations target React Native Windows 0.75.
5+
Both implementations target React Native Windows 0.76.
66

77
The official documentation can be found here:
88

samples/NativeModuleSample/cppwinrt/package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"test": "echo \"Error: no test specified\" && exit 1",
77
"codegen-windows": "react-native codegen-windows",
8-
"windows": "react-native run-windows"
8+
"windows": "npx @react-native-community/cli run-windows"
99
},
1010
"peerDependencies": {
1111
"react": "^16.13.1",
@@ -15,8 +15,8 @@
1515
"devDependencies": {
1616
"metro-config": "^0.66.2",
1717
"react": "18.3.1",
18-
"react-native": "0.75.1",
19-
"react-native-windows": "^0.75.0"
18+
"react-native": "0.76.2",
19+
"react-native-windows": "^0.76.2"
2020
},
2121
"codegenConfig": {
2222
"name": "NativeModuleSample",
@@ -25,5 +25,12 @@
2525
"windows": {
2626
"namespace": "NativeModuleSample"
2727
}
28+
},
29+
"react-native-windows": {
30+
"init-windows": {
31+
"name": "NativeModuleSample",
32+
"namespace": "NativeModuleSample",
33+
"template": "old/uwp-cpp-lib"
34+
}
2835
}
2936
}

samples/NativeModuleSample/cppwinrt/windows/ExperimentalFeatures.props

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@
1616
-->
1717
<UseHermes>true</UseHermes>
1818

19-
<!--
20-
Changes compilation to assume use of WinUI 3 instead of System XAML.
21-
Requires creation of new project.
22-
23-
See https://microsoft.github.io/react-native-windows/docs/winui3
24-
-->
25-
<UseWinUI3>false</UseWinUI3>
26-
2719
<!--
2820
Changes compilation to assume use of Microsoft.ReactNative NuGet packages
2921
instead of building the framework from source.

samples/NativeModuleSample/cppwinrt/windows/NativeModuleSample/NativeModuleSample.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- This project was created with react-native-windows 0.75.0 -->
2+
<!-- This project was created with react-native-windows 0.76.2 -->
33
<Project ToolsVersion="Current" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
44
<Import Project="$(SolutionDir)\ExperimentalFeatures.props" Condition="Exists('$(SolutionDir)\ExperimentalFeatures.props')" />
55
<PropertyGroup Label="Globals">

0 commit comments

Comments
 (0)