diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index b60e5bf3e5c..6bea3541099 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -133,14 +133,11 @@ - template: ../templates/apply-published-version-vars.yml - - ${{ if eq(matrix.UseFabric, true) }}: - - template: ../templates/enable-fabric-experimental-feature.yml - - template: ../templates/msbuild-sln.yml parameters: solutionDir: vnext ${{ if eq(matrix.UseFabric, true) }}: - solutionName: Microsoft.ReactNative.CppOnly.slnf + solutionName: Microsoft.ReactNative.NewArch.sln ${{ else }}: solutionName: Microsoft.ReactNative.sln buildPlatform: ${{ matrix.BuildPlatform }} @@ -187,6 +184,15 @@ Microsoft.ReactNative.Managed.UnitTests\** Mso.UnitTests\** + - ${{ if eq(matrix.UseFabric, true) }}: + - template: ../templates/publish-build-artifacts.yml + parameters: + artifactName: ReactWindowsFabric + buildPlatform: AnyCPU + buildConfiguration: ${{ matrix.BuildConfiguration }} + contents: | + Microsoft.ReactNative.CsWinRT\** + - job: UniversalTest${{ matrix.Name }} variables: - template: ../variables/windows.yml diff --git a/.ado/publish.yml b/.ado/publish.yml index 8ad46e3fce4..5a667f64aa8 100644 --- a/.ado/publish.yml +++ b/.ado/publish.yml @@ -335,14 +335,11 @@ extends: - template: .ado/templates/apply-published-version-vars.yml@self - - ${{ if eq(matrix.UseFabric, true) }}: - - template: .ado/templates/enable-fabric-experimental-feature.yml@self - - template: .ado/templates/msbuild-sln.yml@self parameters: solutionDir: vnext ${{ if eq(matrix.UseFabric, true) }}: - solutionName: Microsoft.ReactNative.CppOnly.slnf + solutionName: Microsoft.ReactNative.NewArch.sln ${{ else }}: solutionName: Microsoft.ReactNative.sln buildPlatform: ${{ matrix.BuildPlatform }} @@ -368,6 +365,7 @@ extends: Microsoft.ReactNative\** Microsoft.ReactNative.Managed\** Microsoft.ReactNative.Managed.CodeGen\** + Microsoft.ReactNative.CsWinRT\** - template: .ado/templates/component-governance.yml@self @@ -471,12 +469,16 @@ extends: configuration: Release - platform: ARM64 configuration: Release + - platform: AnyCPU + configuration: Release - platform: x64 configuration: Debug - platform: x86 configuration: Debug - platform: ARM64 configuration: Debug + - platform: AnyCPU + configuration: Debug - template: .ado/templates/prep-and-pack-nuget.yml@self parameters: diff --git a/.ado/templates/react-native-init-windows.yml b/.ado/templates/react-native-init-windows.yml index 3c3d607fc89..f83fb1072fe 100644 --- a/.ado/templates/react-native-init-windows.yml +++ b/.ado/templates/react-native-init-windows.yml @@ -54,6 +54,8 @@ steps: slices: - platform: ${{ parameters.platform }} configuration: Release + - platform: AnyCPU + configuration: Release - ${{ if endsWith(parameters.template, '-app') }}: - script: | diff --git a/change/@react-native-windows-cli-a6bebc8e-9e15-4f37-a3a1-5b6c4b008d7e.json b/change/@react-native-windows-cli-a6bebc8e-9e15-4f37-a3a1-5b6c4b008d7e.json new file mode 100644 index 00000000000..e60783bc978 --- /dev/null +++ b/change/@react-native-windows-cli-a6bebc8e-9e15-4f37-a3a1-5b6c4b008d7e.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Adding CsWinRT projection for C# apps", + "packageName": "@react-native-windows/cli", + "email": "jthysell@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-cdfa09d5-ff63-4c45-85fa-b6ede9ab1816.json b/change/react-native-windows-cdfa09d5-ff63-4c45-85fa-b6ede9ab1816.json new file mode 100644 index 00000000000..98c032733ad --- /dev/null +++ b/change/react-native-windows-cdfa09d5-ff63-4c45-85fa-b6ede9ab1816.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Adding CsWinRT projection for C# apps", + "packageName": "react-native-windows", + "email": "jthysell@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/@react-native-windows/cli/src/commands/config/configUtils.ts b/packages/@react-native-windows/cli/src/commands/config/configUtils.ts index 3b69b04cd73..1bddd55a32b 100644 --- a/packages/@react-native-windows/cli/src/commands/config/configUtils.ts +++ b/packages/@react-native-windows/cli/src/commands/config/configUtils.ts @@ -105,9 +105,15 @@ export function isRnwDependencyProject(filePath: string): boolean { const projectLang = getProjectLanguage(filePath); if (projectLang === 'cs') { - return importProjectExists( - projectContents, - 'Microsoft.ReactNative.Uwp.CSharpLib.targets', + return ( + importProjectExists( + projectContents, + 'Microsoft.ReactNative.Uwp.CSharpLib.targets', + ) || + importProjectExists( + projectContents, + 'Microsoft.ReactNative.Composition.CSharpLib.targets', + ) ); } else if (projectLang === 'cpp') { return ( @@ -194,9 +200,15 @@ function isRnwAppProject(filePath: string): boolean { const projectLang = getProjectLanguage(filePath); if (projectLang === 'cs') { - return importProjectExists( - projectContents, - 'Microsoft.ReactNative.Uwp.CSharpApp.targets', + return ( + importProjectExists( + projectContents, + 'Microsoft.ReactNative.Uwp.CSharpApp.targets', + ) || + importProjectExists( + projectContents, + 'Microsoft.ReactNative.Composition.CSharpApp.targets', + ) ); } else if (projectLang === 'cpp') { return ( @@ -348,11 +360,18 @@ export function importProjectExists( projectContents: Node, projectName: string, ): boolean { - const nodes = msbuildSelect( + let nodes = msbuildSelect( `//msbuild:Import[contains(@Project,'${projectName}')]`, projectContents, ); + if (nodes.length === 0) { + nodes = msbuildSelect( + `//Import[contains(@Project,'${projectName}')]`, + projectContents, + ); + } + return nodes.length > 0; } diff --git a/vnext/Desktop.ABITests/packages.lock.json b/vnext/Desktop.ABITests/packages.lock.json index 21c2c7789ae..467358f5fbb 100644 --- a/vnext/Desktop.ABITests/packages.lock.json +++ b/vnext/Desktop.ABITests/packages.lock.json @@ -43,19 +43,6 @@ "Microsoft.SourceLink.Common": "1.1.1" } }, - "Microsoft.Windows.SDK.BuildTools": { - "type": "Transitive", - "resolved": "10.0.22621.756", - "contentHash": "7ZL2sFSioYm1Ry067Kw1hg0SCcW5kuVezC2SwjGbcPE61Nn+gTbH86T73G3LcEOVj0S3IZzNuE/29gZvOLS7VA==" - }, - "Microsoft.WindowsAppSDK": { - "type": "Transitive", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - }, "ReactNative.V8Jsi.Windows": { "type": "Transitive", "resolved": "0.71.8", @@ -91,7 +78,6 @@ "FollyWin32": "[1.0.0, )", "Microsoft.JavaScript.Hermes": "[0.1.23, )", "Microsoft.SourceLink.GitHub": "[1.1.1, )", - "Microsoft.WindowsAppSDK": "[1.5.240227000, )", "ReactCommon": "[1.0.0, )", "ReactNative.V8Jsi.Windows": "[0.71.8, )", "boost": "[1.83.0, )" @@ -115,45 +101,9 @@ } } }, - "native,Version=v0.0/win": { - "Microsoft.WindowsAppSDK": { - "type": "Transitive", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - } - }, - "native,Version=v0.0/win-arm64": { - "Microsoft.WindowsAppSDK": { - "type": "Transitive", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - } - }, - "native,Version=v0.0/win-x64": { - "Microsoft.WindowsAppSDK": { - "type": "Transitive", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - } - }, - "native,Version=v0.0/win-x86": { - "Microsoft.WindowsAppSDK": { - "type": "Transitive", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - } - } + "native,Version=v0.0/win": {}, + "native,Version=v0.0/win-arm64": {}, + "native,Version=v0.0/win-x64": {}, + "native,Version=v0.0/win-x86": {} } } \ No newline at end of file diff --git a/vnext/Desktop.DLL/packages.lock.json b/vnext/Desktop.DLL/packages.lock.json index 8abca65d6bb..88ec8d44fc5 100644 --- a/vnext/Desktop.DLL/packages.lock.json +++ b/vnext/Desktop.DLL/packages.lock.json @@ -40,19 +40,6 @@ "resolved": "1.1.1", "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" }, - "Microsoft.Windows.SDK.BuildTools": { - "type": "Transitive", - "resolved": "10.0.22621.756", - "contentHash": "7ZL2sFSioYm1Ry067Kw1hg0SCcW5kuVezC2SwjGbcPE61Nn+gTbH86T73G3LcEOVj0S3IZzNuE/29gZvOLS7VA==" - }, - "Microsoft.WindowsAppSDK": { - "type": "Transitive", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - }, "common": { "type": "Project", "dependencies": { @@ -83,7 +70,6 @@ "FollyWin32": "[1.0.0, )", "Microsoft.JavaScript.Hermes": "[0.1.23, )", "Microsoft.SourceLink.GitHub": "[1.1.1, )", - "Microsoft.WindowsAppSDK": "[1.5.240227000, )", "ReactCommon": "[1.0.0, )", "ReactNative.V8Jsi.Windows": "[0.71.8, )", "boost": "[1.83.0, )" diff --git a/vnext/Desktop.IntegrationTests/packages.lock.json b/vnext/Desktop.IntegrationTests/packages.lock.json index 13031e0c654..6784af88ddc 100644 --- a/vnext/Desktop.IntegrationTests/packages.lock.json +++ b/vnext/Desktop.IntegrationTests/packages.lock.json @@ -44,19 +44,6 @@ "Microsoft.SourceLink.Common": "1.1.1" } }, - "Microsoft.Windows.SDK.BuildTools": { - "type": "Transitive", - "resolved": "10.0.22621.756", - "contentHash": "7ZL2sFSioYm1Ry067Kw1hg0SCcW5kuVezC2SwjGbcPE61Nn+gTbH86T73G3LcEOVj0S3IZzNuE/29gZvOLS7VA==" - }, - "Microsoft.WindowsAppSDK": { - "type": "Transitive", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - }, "ReactNative.V8Jsi.Windows": { "type": "Transitive", "resolved": "0.71.8", @@ -92,7 +79,6 @@ "FollyWin32": "[1.0.0, )", "Microsoft.JavaScript.Hermes": "[0.1.23, )", "Microsoft.SourceLink.GitHub": "[1.1.1, )", - "Microsoft.WindowsAppSDK": "[1.5.240227000, )", "ReactCommon": "[1.0.0, )", "ReactNative.V8Jsi.Windows": "[0.71.8, )", "boost": "[1.83.0, )" diff --git a/vnext/Desktop.UnitTests/packages.lock.json b/vnext/Desktop.UnitTests/packages.lock.json index 8146b6f01eb..b8a538813d6 100644 --- a/vnext/Desktop.UnitTests/packages.lock.json +++ b/vnext/Desktop.UnitTests/packages.lock.json @@ -44,19 +44,6 @@ "Microsoft.SourceLink.Common": "1.1.1" } }, - "Microsoft.Windows.SDK.BuildTools": { - "type": "Transitive", - "resolved": "10.0.22621.756", - "contentHash": "7ZL2sFSioYm1Ry067Kw1hg0SCcW5kuVezC2SwjGbcPE61Nn+gTbH86T73G3LcEOVj0S3IZzNuE/29gZvOLS7VA==" - }, - "Microsoft.WindowsAppSDK": { - "type": "Transitive", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - }, "ReactNative.V8Jsi.Windows": { "type": "Transitive", "resolved": "0.71.8", @@ -92,7 +79,6 @@ "FollyWin32": "[1.0.0, )", "Microsoft.JavaScript.Hermes": "[0.1.23, )", "Microsoft.SourceLink.GitHub": "[1.1.1, )", - "Microsoft.WindowsAppSDK": "[1.5.240227000, )", "ReactCommon": "[1.0.0, )", "ReactNative.V8Jsi.Windows": "[0.71.8, )", "boost": "[1.83.0, )" diff --git a/vnext/Desktop/packages.lock.json b/vnext/Desktop/packages.lock.json index 116b95eb540..5e7bdc59490 100644 --- a/vnext/Desktop/packages.lock.json +++ b/vnext/Desktop/packages.lock.json @@ -30,15 +30,6 @@ "resolved": "2.0.230706.1", "contentHash": "l0D7oCw/5X+xIKHqZTi62TtV+1qeSz7KVluNFdrJ9hXsst4ghvqQ/Yhura7JqRdZWBXAuDS0G0KwALptdoxweQ==" }, - "Microsoft.WindowsAppSDK": { - "type": "Direct", - "requested": "[1.5.240227000, )", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - }, "ReactNative.V8Jsi.Windows": { "type": "Direct", "requested": "[0.71.8, )", @@ -55,11 +46,6 @@ "resolved": "1.1.1", "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" }, - "Microsoft.Windows.SDK.BuildTools": { - "type": "Transitive", - "resolved": "10.0.22621.756", - "contentHash": "7ZL2sFSioYm1Ry067Kw1hg0SCcW5kuVezC2SwjGbcPE61Nn+gTbH86T73G3LcEOVj0S3IZzNuE/29gZvOLS7VA==" - }, "common": { "type": "Project", "dependencies": { @@ -90,49 +76,9 @@ } } }, - "native,Version=v0.0/win": { - "Microsoft.WindowsAppSDK": { - "type": "Direct", - "requested": "[1.5.240227000, )", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - } - }, - "native,Version=v0.0/win-arm64": { - "Microsoft.WindowsAppSDK": { - "type": "Direct", - "requested": "[1.5.240227000, )", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - } - }, - "native,Version=v0.0/win-x64": { - "Microsoft.WindowsAppSDK": { - "type": "Direct", - "requested": "[1.5.240227000, )", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - } - }, - "native,Version=v0.0/win-x86": { - "Microsoft.WindowsAppSDK": { - "type": "Direct", - "requested": "[1.5.240227000, )", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - } - } + "native,Version=v0.0/win": {}, + "native,Version=v0.0/win-arm64": {}, + "native,Version=v0.0/win-x64": {}, + "native,Version=v0.0/win-x86": {} } } \ No newline at end of file diff --git a/vnext/ExperimentalFeatures.props b/vnext/ExperimentalFeatures.props index f74a2618456..da08008a8a2 100644 --- a/vnext/ExperimentalFeatures.props +++ b/vnext/ExperimentalFeatures.props @@ -1,8 +1,14 @@ + + false + false + true + false - - true + + true + true diff --git a/vnext/Microsoft.ReactNative.CppOnly.slnf b/vnext/Microsoft.ReactNative.CppOnly.slnf deleted file mode 100644 index 37e629b4d28..00000000000 --- a/vnext/Microsoft.ReactNative.CppOnly.slnf +++ /dev/null @@ -1,21 +0,0 @@ -{ - "solution": { - "path": "Microsoft.ReactNative.sln", - "projects": [ - "Chakra\\Chakra.vcxitems", - "Common\\Common.vcxproj", - "Folly\\Folly.vcxproj", - "Microsoft.ReactNative.ComponentTests\\Microsoft.ReactNative.ComponentTests.vcxproj", - "Microsoft.ReactNative.Cxx.UnitTests\\Microsoft.ReactNative.Cxx.UnitTests.vcxproj", - "Microsoft.ReactNative.Cxx\\Microsoft.ReactNative.Cxx.vcxitems", - "Microsoft.ReactNative.IntegrationTests\\Microsoft.ReactNative.IntegrationTests.vcxproj", - "Microsoft.ReactNative\\Microsoft.ReactNative.vcxproj", - "Mso.UnitTests\\Mso.UnitTests.vcxproj", - "Mso\\Mso.vcxitems", - "ReactCommon\\ReactCommon.vcxproj", - "Shared\\Shared.vcxitems", - "fmt\\fmt.vcxproj", - "include\\Include.vcxitems" - ] - } -} \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative.CsWinRT/Microsoft.ReactNative.CsWinRT.csproj b/vnext/Microsoft.ReactNative.CsWinRT/Microsoft.ReactNative.CsWinRT.csproj new file mode 100644 index 00000000000..d1bce649dcb --- /dev/null +++ b/vnext/Microsoft.ReactNative.CsWinRT/Microsoft.ReactNative.CsWinRT.csproj @@ -0,0 +1,31 @@ + + + + + net6.0-windows10.0.22621.0 + 10.0.17763.0 + AnyCPU + + None + CS8305;CS0436 + Microsoft.ReactNative.Projection + + + + + + + + + + + + + 10.0.22621.38 + Microsoft.ReactNative + + Windows; + Microsoft + + + diff --git a/vnext/Microsoft.ReactNative.CsWinRT/packages.lock.json b/vnext/Microsoft.ReactNative.CsWinRT/packages.lock.json new file mode 100644 index 00000000000..1ca68c7e8b2 --- /dev/null +++ b/vnext/Microsoft.ReactNative.CsWinRT/packages.lock.json @@ -0,0 +1,195 @@ +{ + "version": 1, + "dependencies": { + "net6.0-windows10.0.22621": { + "Microsoft.Windows.CsWinRT": { + "type": "Direct", + "requested": "[2.1.3, )", + "resolved": "2.1.3", + "contentHash": "Nl8A4rQ4l2GNj703GvLSbr0Vo++FjxKxU7CIj1pcKz/sN8XSvD4dIvUCYYgD16o2pG4PSSXNgAxfwDUwLGHLPA==" + }, + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.6.240829007, )", + "resolved": "1.6.240829007", + "contentHash": "Ij0jXARFOlRY+n7M32ZS9Kbf+x7gmnhWVnMP3eKHe83eu/2pzh9f4gjmoZ5fAgoZaKWCa2PvcxzHx0gtRXcKRQ==", + "dependencies": { + "Microsoft.Web.WebView2": "1.0.2651.64", + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" + } + }, + "Microsoft.Web.WebView2": { + "type": "Transitive", + "resolved": "1.0.2651.64", + "contentHash": "f5sc/vcAoTCTEW7Nqzp4galAuTRguZViw8ksn+Nx2uskEBPm0/ubzy6gVjvXS/P96jLS89C8T9I0hPc417xpNg==" + }, + "Microsoft.Windows.SDK.BuildTools": { + "type": "Transitive", + "resolved": "10.0.22621.756", + "contentHash": "7ZL2sFSioYm1Ry067Kw1hg0SCcW5kuVezC2SwjGbcPE61Nn+gTbH86T73G3LcEOVj0S3IZzNuE/29gZvOLS7VA==" + }, + "common": { + "type": "Project" + }, + "fmt": { + "type": "Project" + }, + "folly": { + "type": "Project", + "dependencies": { + "fmt": "[1.0.0, )" + } + }, + "microsoft.reactnative": { + "type": "Project", + "dependencies": { + "Common": "[1.0.0, )", + "Folly": "[1.0.0, )", + "ReactCommon": "[1.0.0, )" + } + }, + "reactcommon": { + "type": "Project", + "dependencies": { + "Folly": "[1.0.0, )" + } + } + }, + "net6.0-windows10.0.22621/win10-arm": { + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.6.240829007, )", + "resolved": "1.6.240829007", + "contentHash": "Ij0jXARFOlRY+n7M32ZS9Kbf+x7gmnhWVnMP3eKHe83eu/2pzh9f4gjmoZ5fAgoZaKWCa2PvcxzHx0gtRXcKRQ==", + "dependencies": { + "Microsoft.Web.WebView2": "1.0.2651.64", + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" + } + }, + "Microsoft.Web.WebView2": { + "type": "Transitive", + "resolved": "1.0.2651.64", + "contentHash": "f5sc/vcAoTCTEW7Nqzp4galAuTRguZViw8ksn+Nx2uskEBPm0/ubzy6gVjvXS/P96jLS89C8T9I0hPc417xpNg==" + } + }, + "net6.0-windows10.0.22621/win10-arm-aot": { + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.6.240829007, )", + "resolved": "1.6.240829007", + "contentHash": "Ij0jXARFOlRY+n7M32ZS9Kbf+x7gmnhWVnMP3eKHe83eu/2pzh9f4gjmoZ5fAgoZaKWCa2PvcxzHx0gtRXcKRQ==", + "dependencies": { + "Microsoft.Web.WebView2": "1.0.2651.64", + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" + } + }, + "Microsoft.Web.WebView2": { + "type": "Transitive", + "resolved": "1.0.2651.64", + "contentHash": "f5sc/vcAoTCTEW7Nqzp4galAuTRguZViw8ksn+Nx2uskEBPm0/ubzy6gVjvXS/P96jLS89C8T9I0hPc417xpNg==" + } + }, + "net6.0-windows10.0.22621/win10-arm64": { + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.6.240829007, )", + "resolved": "1.6.240829007", + "contentHash": "Ij0jXARFOlRY+n7M32ZS9Kbf+x7gmnhWVnMP3eKHe83eu/2pzh9f4gjmoZ5fAgoZaKWCa2PvcxzHx0gtRXcKRQ==", + "dependencies": { + "Microsoft.Web.WebView2": "1.0.2651.64", + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" + } + }, + "Microsoft.Web.WebView2": { + "type": "Transitive", + "resolved": "1.0.2651.64", + "contentHash": "f5sc/vcAoTCTEW7Nqzp4galAuTRguZViw8ksn+Nx2uskEBPm0/ubzy6gVjvXS/P96jLS89C8T9I0hPc417xpNg==" + } + }, + "net6.0-windows10.0.22621/win10-arm64-aot": { + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.6.240829007, )", + "resolved": "1.6.240829007", + "contentHash": "Ij0jXARFOlRY+n7M32ZS9Kbf+x7gmnhWVnMP3eKHe83eu/2pzh9f4gjmoZ5fAgoZaKWCa2PvcxzHx0gtRXcKRQ==", + "dependencies": { + "Microsoft.Web.WebView2": "1.0.2651.64", + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" + } + }, + "Microsoft.Web.WebView2": { + "type": "Transitive", + "resolved": "1.0.2651.64", + "contentHash": "f5sc/vcAoTCTEW7Nqzp4galAuTRguZViw8ksn+Nx2uskEBPm0/ubzy6gVjvXS/P96jLS89C8T9I0hPc417xpNg==" + } + }, + "net6.0-windows10.0.22621/win10-x64": { + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.6.240829007, )", + "resolved": "1.6.240829007", + "contentHash": "Ij0jXARFOlRY+n7M32ZS9Kbf+x7gmnhWVnMP3eKHe83eu/2pzh9f4gjmoZ5fAgoZaKWCa2PvcxzHx0gtRXcKRQ==", + "dependencies": { + "Microsoft.Web.WebView2": "1.0.2651.64", + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" + } + }, + "Microsoft.Web.WebView2": { + "type": "Transitive", + "resolved": "1.0.2651.64", + "contentHash": "f5sc/vcAoTCTEW7Nqzp4galAuTRguZViw8ksn+Nx2uskEBPm0/ubzy6gVjvXS/P96jLS89C8T9I0hPc417xpNg==" + } + }, + "net6.0-windows10.0.22621/win10-x64-aot": { + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.6.240829007, )", + "resolved": "1.6.240829007", + "contentHash": "Ij0jXARFOlRY+n7M32ZS9Kbf+x7gmnhWVnMP3eKHe83eu/2pzh9f4gjmoZ5fAgoZaKWCa2PvcxzHx0gtRXcKRQ==", + "dependencies": { + "Microsoft.Web.WebView2": "1.0.2651.64", + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" + } + }, + "Microsoft.Web.WebView2": { + "type": "Transitive", + "resolved": "1.0.2651.64", + "contentHash": "f5sc/vcAoTCTEW7Nqzp4galAuTRguZViw8ksn+Nx2uskEBPm0/ubzy6gVjvXS/P96jLS89C8T9I0hPc417xpNg==" + } + }, + "net6.0-windows10.0.22621/win10-x86": { + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.6.240829007, )", + "resolved": "1.6.240829007", + "contentHash": "Ij0jXARFOlRY+n7M32ZS9Kbf+x7gmnhWVnMP3eKHe83eu/2pzh9f4gjmoZ5fAgoZaKWCa2PvcxzHx0gtRXcKRQ==", + "dependencies": { + "Microsoft.Web.WebView2": "1.0.2651.64", + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" + } + }, + "Microsoft.Web.WebView2": { + "type": "Transitive", + "resolved": "1.0.2651.64", + "contentHash": "f5sc/vcAoTCTEW7Nqzp4galAuTRguZViw8ksn+Nx2uskEBPm0/ubzy6gVjvXS/P96jLS89C8T9I0hPc417xpNg==" + } + }, + "net6.0-windows10.0.22621/win10-x86-aot": { + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.6.240829007, )", + "resolved": "1.6.240829007", + "contentHash": "Ij0jXARFOlRY+n7M32ZS9Kbf+x7gmnhWVnMP3eKHe83eu/2pzh9f4gjmoZ5fAgoZaKWCa2PvcxzHx0gtRXcKRQ==", + "dependencies": { + "Microsoft.Web.WebView2": "1.0.2651.64", + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" + } + }, + "Microsoft.Web.WebView2": { + "type": "Transitive", + "resolved": "1.0.2651.64", + "contentHash": "f5sc/vcAoTCTEW7Nqzp4galAuTRguZViw8ksn+Nx2uskEBPm0/ubzy6gVjvXS/P96jLS89C8T9I0hPc417xpNg==" + } + } + } +} \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative.NewArch.sln b/vnext/Microsoft.ReactNative.NewArch.sln new file mode 100644 index 00000000000..10a03cad46e --- /dev/null +++ b/vnext/Microsoft.ReactNative.NewArch.sln @@ -0,0 +1,283 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32929.385 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative", "Microsoft.ReactNative\Microsoft.ReactNative.vcxproj", "{F7D32BD0-2749-483E-9A0D-1635EF7E3136}" + ProjectSection(ProjectDependencies) = postProject + {14B93DC8-FD93-4A6D-81CB-8BC96644501C} = {14B93DC8-FD93-4A6D-81CB-8BC96644501C} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra", "Chakra\Chakra.vcxitems", "{C38970C0-5FBF-4D69-90D8-CBAC225AE895}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "Common\Common.vcxproj", "{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folly", "Folly\Folly.vcxproj", "{A990658C-CE31-4BCC-976F-0FC6B1AF693D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fmt", "fmt\fmt.vcxproj", "{14B93DC8-FD93-4A6D-81CB-8BC96644501C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Include", "include\Include.vcxitems", "{EF074BA1-2D54-4D49-A28E-5E040B47CD2E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.Cxx.UnitTests", "Microsoft.ReactNative.Cxx.UnitTests\Microsoft.ReactNative.Cxx.UnitTests.vcxproj", "{6C60E295-C8CA-4DC5-B8BE-09888F58B249}" + ProjectSection(ProjectDependencies) = postProject + {F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {F7D32BD0-2749-483E-9A0D-1635EF7E3136} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.ComponentTests", "Microsoft.ReactNative.ComponentTests\Microsoft.ReactNative.ComponentTests.vcxproj", "{93792779-4948-4A5D-8CA7-86ED5E3BEC27}" + ProjectSection(ProjectDependencies) = postProject + {F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {F7D32BD0-2749-483E-9A0D-1635EF7E3136} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.Cxx", "Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems", "{DA8B35B3-DA00-4B02-BDE6-6A397B3FD46B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mso", "Mso\Mso.vcxitems", "{84E05BFA-CBAF-4F0D-BFB6-4CE85742A57E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mso.UnitTests", "Mso.UnitTests\Mso.UnitTests.vcxproj", "{1958CEAA-FBE0-44E3-8A99-90AD85531FFE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactCommon", "ReactCommon\ReactCommon.vcxproj", "{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{25C4DA8C-A4D2-4D5F-950A-E5371A8AB659}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies (External)", "Dependencies (External)", "{814A1893-F3C3-45BA-8C80-5377CFD86C5F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies (Internal)", "Dependencies (Internal)", "{6348365C-E58A-4CB4-96CA-E2A6C1201DD6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Other", "Other", "{1DA4BB3B-D0B1-4933-BDBA-60B553B4F946}" + ProjectSection(SolutionItems) = preProject + Directory.Build.props = Directory.Build.props + Directory.Build.targets = Directory.Build.targets + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PropertySheets", "PropertySheets", "{D1CDE6A6-E011-4852-8500-E259AD60846F}" + ProjectSection(SolutionItems) = preProject + PropertySheets\ARM64.props = PropertySheets\ARM64.props + PropertySheets\Bundle.Common.targets = PropertySheets\Bundle.Common.targets + PropertySheets\Bundle.Cpp.targets = PropertySheets\Bundle.Cpp.targets + PropertySheets\Bundle.props = PropertySheets\Bundle.props + PropertySheets\Bundle.targets = PropertySheets\Bundle.targets + PropertySheets\Debug.props = PropertySheets\Debug.props + PropertySheets\React.Cpp.props = PropertySheets\React.Cpp.props + PropertySheets\ReactCommunity.cpp.props = PropertySheets\ReactCommunity.cpp.props + PropertySheets\Release.props = PropertySheets\Release.props + PropertySheets\Warnings.props = PropertySheets\Warnings.props + PropertySheets\Win32.props = PropertySheets\Win32.props + PropertySheets\x64.props = PropertySheets\x64.props + PropertySheets\x86.props = PropertySheets\x86.props + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Application", "Application", "{4CA4053F-17D8-4619-8600-FF672209828C}" + ProjectSection(SolutionItems) = preProject + PropertySheets\Application\ARM64.props = PropertySheets\Application\ARM64.props + PropertySheets\Application\Debug.props = PropertySheets\Application\Debug.props + PropertySheets\Application\DebugBundle.props = PropertySheets\Application\DebugBundle.props + PropertySheets\Application\Release.props = PropertySheets\Application\Release.props + PropertySheets\Application\ReleaseBundle.props = PropertySheets\Application\ReleaseBundle.props + PropertySheets\Application\Win32.props = PropertySheets\Application\Win32.props + PropertySheets\Application\x64.props = PropertySheets\Application\x64.props + PropertySheets\Application\x86.props = PropertySheets\Application\x86.props + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DynamicLibrary", "DynamicLibrary", "{19F9503C-4A05-4F96-8A41-0BD93228F220}" + ProjectSection(SolutionItems) = preProject + PropertySheets\DynamicLibrary\ARM64.props = PropertySheets\DynamicLibrary\ARM64.props + PropertySheets\DynamicLibrary\Debug.props = PropertySheets\DynamicLibrary\Debug.props + PropertySheets\DynamicLibrary\DebugBundle.props = PropertySheets\DynamicLibrary\DebugBundle.props + PropertySheets\DynamicLibrary\Release.props = PropertySheets\DynamicLibrary\Release.props + PropertySheets\DynamicLibrary\ReleaseBundle.props = PropertySheets\DynamicLibrary\ReleaseBundle.props + PropertySheets\DynamicLibrary\Win32.props = PropertySheets\DynamicLibrary\Win32.props + PropertySheets\DynamicLibrary\x64.props = PropertySheets\DynamicLibrary\x64.props + PropertySheets\DynamicLibrary\x86.props = PropertySheets\DynamicLibrary\x86.props + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "StaticLibrary", "StaticLibrary", "{529E25F3-F1D4-41CC-9BAC-DEE9A5B0FF97}" + ProjectSection(SolutionItems) = preProject + PropertySheets\StaticLibrary\ARM64.props = PropertySheets\StaticLibrary\ARM64.props + PropertySheets\StaticLibrary\Debug.props = PropertySheets\StaticLibrary\Debug.props + PropertySheets\StaticLibrary\DebugBundle.props = PropertySheets\StaticLibrary\DebugBundle.props + PropertySheets\StaticLibrary\Release.props = PropertySheets\StaticLibrary\Release.props + PropertySheets\StaticLibrary\ReleaseBundle.props = PropertySheets\StaticLibrary\ReleaseBundle.props + PropertySheets\StaticLibrary\Win32.props = PropertySheets\StaticLibrary\Win32.props + PropertySheets\StaticLibrary\x64.props = PropertySheets\StaticLibrary\x64.props + PropertySheets\StaticLibrary\x86.props = PropertySheets\StaticLibrary\x86.props + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MIDL", "MIDL", "{A7A199BB-2B8D-4142-92D0-5EA0B299F287}" + ProjectSection(SolutionItems) = preProject + PropertySheets\MIDL\midlrt.props = PropertySheets\MIDL\midlrt.props + PropertySheets\MIDL\midlrt.targets = PropertySheets\MIDL\midlrt.targets + PropertySheets\MIDL\MidlRT.xml = PropertySheets\MIDL\MidlRT.xml + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.IntegrationTests", "Microsoft.ReactNative.IntegrationTests\Microsoft.ReactNative.IntegrationTests.vcxproj", "{14FA0516-E6D7-4E4D-B097-1470198C5072}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{CF71BDBF-544C-4EBC-85F6-6911A0E2F5B8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.Shared", "Shared\Shared.vcxitems", "{2049DBE9-8D13-42C9-AE4B-413AE38FFFD0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ReactNative.CsWinRT", "Microsoft.ReactNative.CsWinRT\Microsoft.ReactNative.CsWinRT.csproj", "{B76BB397-D882-48D8-AA8D-DA9921860B2B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Debug|ARM64 = Debug|ARM64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Release|ARM64 = Release|ARM64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.Build.0 = Debug|ARM64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.ActiveCfg = Debug|x64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.Build.0 = Debug|x64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.ActiveCfg = Debug|Win32 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.Build.0 = Debug|Win32 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.ActiveCfg = Release|ARM64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.Build.0 = Release|ARM64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.ActiveCfg = Release|x64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.Build.0 = Release|x64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.ActiveCfg = Release|Win32 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.Build.0 = Release|Win32 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.Build.0 = Debug|ARM64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.ActiveCfg = Debug|x64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.Build.0 = Debug|x64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.ActiveCfg = Debug|Win32 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.Build.0 = Debug|Win32 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.ActiveCfg = Release|ARM64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.Build.0 = Release|ARM64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.ActiveCfg = Release|x64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.Build.0 = Release|x64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.ActiveCfg = Release|Win32 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.Build.0 = Release|Win32 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.Build.0 = Debug|ARM64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.ActiveCfg = Debug|x64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.Build.0 = Debug|x64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.ActiveCfg = Debug|Win32 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.Build.0 = Debug|Win32 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.ActiveCfg = Release|ARM64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.Build.0 = Release|ARM64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.ActiveCfg = Release|x64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.Build.0 = Release|x64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.ActiveCfg = Release|Win32 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.Build.0 = Release|Win32 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Debug|ARM64.Build.0 = Debug|ARM64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Debug|x64.ActiveCfg = Debug|x64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Debug|x64.Build.0 = Debug|x64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Debug|x86.ActiveCfg = Debug|Win32 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Debug|x86.Build.0 = Debug|Win32 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Debug|x86.Deploy.0 = Debug|Win32 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|ARM64.ActiveCfg = Release|ARM64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|ARM64.Build.0 = Release|ARM64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|x64.ActiveCfg = Release|x64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|x64.Build.0 = Release|x64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|x86.ActiveCfg = Release|Win32 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|x86.Build.0 = Release|Win32 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|x86.Deploy.0 = Release|Win32 + {6C60E295-C8CA-4DC5-B8BE-09888F58B249}.Debug|ARM64.ActiveCfg = Debug|Win32 + {6C60E295-C8CA-4DC5-B8BE-09888F58B249}.Debug|x64.ActiveCfg = Debug|x64 + {6C60E295-C8CA-4DC5-B8BE-09888F58B249}.Debug|x64.Build.0 = Debug|x64 + {6C60E295-C8CA-4DC5-B8BE-09888F58B249}.Debug|x86.ActiveCfg = Debug|Win32 + {6C60E295-C8CA-4DC5-B8BE-09888F58B249}.Debug|x86.Build.0 = Debug|Win32 + {6C60E295-C8CA-4DC5-B8BE-09888F58B249}.Release|ARM64.ActiveCfg = Release|Win32 + {6C60E295-C8CA-4DC5-B8BE-09888F58B249}.Release|x64.ActiveCfg = Release|x64 + {6C60E295-C8CA-4DC5-B8BE-09888F58B249}.Release|x64.Build.0 = Release|x64 + {6C60E295-C8CA-4DC5-B8BE-09888F58B249}.Release|x86.ActiveCfg = Release|Win32 + {6C60E295-C8CA-4DC5-B8BE-09888F58B249}.Release|x86.Build.0 = Release|Win32 + {93792779-4948-4A5D-8CA7-86ED5E3BEC27}.Debug|ARM64.ActiveCfg = Debug|Win32 + {93792779-4948-4A5D-8CA7-86ED5E3BEC27}.Debug|x64.ActiveCfg = Debug|x64 + {93792779-4948-4A5D-8CA7-86ED5E3BEC27}.Debug|x64.Build.0 = Debug|x64 + {93792779-4948-4A5D-8CA7-86ED5E3BEC27}.Debug|x86.ActiveCfg = Debug|Win32 + {93792779-4948-4A5D-8CA7-86ED5E3BEC27}.Release|ARM64.ActiveCfg = Release|Win32 + {93792779-4948-4A5D-8CA7-86ED5E3BEC27}.Release|x64.ActiveCfg = Release|x64 + {93792779-4948-4A5D-8CA7-86ED5E3BEC27}.Release|x86.ActiveCfg = Release|Win32 + {1958CEAA-FBE0-44E3-8A99-90AD85531FFE}.Debug|ARM64.ActiveCfg = Debug|Win32 + {1958CEAA-FBE0-44E3-8A99-90AD85531FFE}.Debug|x64.ActiveCfg = Debug|x64 + {1958CEAA-FBE0-44E3-8A99-90AD85531FFE}.Debug|x64.Build.0 = Debug|x64 + {1958CEAA-FBE0-44E3-8A99-90AD85531FFE}.Debug|x86.ActiveCfg = Debug|Win32 + {1958CEAA-FBE0-44E3-8A99-90AD85531FFE}.Debug|x86.Build.0 = Debug|Win32 + {1958CEAA-FBE0-44E3-8A99-90AD85531FFE}.Release|ARM64.ActiveCfg = Release|Win32 + {1958CEAA-FBE0-44E3-8A99-90AD85531FFE}.Release|x64.ActiveCfg = Release|x64 + {1958CEAA-FBE0-44E3-8A99-90AD85531FFE}.Release|x64.Build.0 = Release|x64 + {1958CEAA-FBE0-44E3-8A99-90AD85531FFE}.Release|x86.ActiveCfg = Release|Win32 + {1958CEAA-FBE0-44E3-8A99-90AD85531FFE}.Release|x86.Build.0 = Release|Win32 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.Build.0 = Debug|ARM64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.ActiveCfg = Debug|x64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.Build.0 = Debug|x64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.ActiveCfg = Debug|Win32 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.Build.0 = Debug|Win32 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.ActiveCfg = Release|ARM64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.Build.0 = Release|ARM64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.ActiveCfg = Release|x64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.Build.0 = Release|x64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.ActiveCfg = Release|Win32 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.Build.0 = Release|Win32 + {14FA0516-E6D7-4E4D-B097-1470198C5072}.Debug|ARM64.ActiveCfg = Debug|Win32 + {14FA0516-E6D7-4E4D-B097-1470198C5072}.Debug|x64.ActiveCfg = Debug|x64 + {14FA0516-E6D7-4E4D-B097-1470198C5072}.Debug|x64.Build.0 = Debug|x64 + {14FA0516-E6D7-4E4D-B097-1470198C5072}.Debug|x86.ActiveCfg = Debug|Win32 + {14FA0516-E6D7-4E4D-B097-1470198C5072}.Debug|x86.Build.0 = Debug|Win32 + {14FA0516-E6D7-4E4D-B097-1470198C5072}.Release|ARM64.ActiveCfg = Release|Win32 + {14FA0516-E6D7-4E4D-B097-1470198C5072}.Release|x64.ActiveCfg = Release|x64 + {14FA0516-E6D7-4E4D-B097-1470198C5072}.Release|x64.Build.0 = Release|x64 + {14FA0516-E6D7-4E4D-B097-1470198C5072}.Release|x86.ActiveCfg = Release|Win32 + {14FA0516-E6D7-4E4D-B097-1470198C5072}.Release|x86.Build.0 = Release|Win32 + {B76BB397-D882-48D8-AA8D-DA9921860B2B}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {B76BB397-D882-48D8-AA8D-DA9921860B2B}.Debug|ARM64.Build.0 = Debug|Any CPU + {B76BB397-D882-48D8-AA8D-DA9921860B2B}.Debug|x64.ActiveCfg = Debug|Any CPU + {B76BB397-D882-48D8-AA8D-DA9921860B2B}.Debug|x64.Build.0 = Debug|Any CPU + {B76BB397-D882-48D8-AA8D-DA9921860B2B}.Debug|x86.ActiveCfg = Debug|Any CPU + {B76BB397-D882-48D8-AA8D-DA9921860B2B}.Debug|x86.Build.0 = Debug|Any CPU + {B76BB397-D882-48D8-AA8D-DA9921860B2B}.Release|ARM64.ActiveCfg = Release|Any CPU + {B76BB397-D882-48D8-AA8D-DA9921860B2B}.Release|ARM64.Build.0 = Release|Any CPU + {B76BB397-D882-48D8-AA8D-DA9921860B2B}.Release|x64.ActiveCfg = Release|Any CPU + {B76BB397-D882-48D8-AA8D-DA9921860B2B}.Release|x64.Build.0 = Release|Any CPU + {B76BB397-D882-48D8-AA8D-DA9921860B2B}.Release|x86.ActiveCfg = Release|Any CPU + {B76BB397-D882-48D8-AA8D-DA9921860B2B}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {C38970C0-5FBF-4D69-90D8-CBAC225AE895} = {6348365C-E58A-4CB4-96CA-E2A6C1201DD6} + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D} = {6348365C-E58A-4CB4-96CA-E2A6C1201DD6} + {A990658C-CE31-4BCC-976F-0FC6B1AF693D} = {814A1893-F3C3-45BA-8C80-5377CFD86C5F} + {14B93DC8-FD93-4A6D-81CB-8BC96644501C} = {814A1893-F3C3-45BA-8C80-5377CFD86C5F} + {EF074BA1-2D54-4D49-A28E-5E040B47CD2E} = {6348365C-E58A-4CB4-96CA-E2A6C1201DD6} + {6C60E295-C8CA-4DC5-B8BE-09888F58B249} = {25C4DA8C-A4D2-4D5F-950A-E5371A8AB659} + {93792779-4948-4A5D-8CA7-86ED5E3BEC27} = {25C4DA8C-A4D2-4D5F-950A-E5371A8AB659} + {84E05BFA-CBAF-4F0D-BFB6-4CE85742A57E} = {6348365C-E58A-4CB4-96CA-E2A6C1201DD6} + {1958CEAA-FBE0-44E3-8A99-90AD85531FFE} = {25C4DA8C-A4D2-4D5F-950A-E5371A8AB659} + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD} = {814A1893-F3C3-45BA-8C80-5377CFD86C5F} + {D1CDE6A6-E011-4852-8500-E259AD60846F} = {1DA4BB3B-D0B1-4933-BDBA-60B553B4F946} + {4CA4053F-17D8-4619-8600-FF672209828C} = {D1CDE6A6-E011-4852-8500-E259AD60846F} + {19F9503C-4A05-4F96-8A41-0BD93228F220} = {D1CDE6A6-E011-4852-8500-E259AD60846F} + {529E25F3-F1D4-41CC-9BAC-DEE9A5B0FF97} = {D1CDE6A6-E011-4852-8500-E259AD60846F} + {A7A199BB-2B8D-4142-92D0-5EA0B299F287} = {D1CDE6A6-E011-4852-8500-E259AD60846F} + {14FA0516-E6D7-4E4D-B097-1470198C5072} = {25C4DA8C-A4D2-4D5F-950A-E5371A8AB659} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {988F03E6-640A-4C7E-8B55-C1291B70669E} + EndGlobalSection + GlobalSection(SharedMSBuildProjectFiles) = preSolution + Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{14fa0516-e6d7-4e4d-b097-1470198c5072}*SharedItemsImports = 4 + Mso\Mso.vcxitems*{14fa0516-e6d7-4e4d-b097-1470198c5072}*SharedItemsImports = 4 + Mso\Mso.vcxitems*{1958ceaa-fbe0-44e3-8a99-90ad85531ffe}*SharedItemsImports = 4 + Shared\Shared.vcxitems*{2049dbe9-8d13-42c9-ae4b-413ae38fffd0}*SharedItemsImports = 9 + Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{6c60e295-c8ca-4dc5-b8be-09888f58b249}*SharedItemsImports = 4 + Mso\Mso.vcxitems*{6c60e295-c8ca-4dc5-b8be-09888f58b249}*SharedItemsImports = 4 + Mso\Mso.vcxitems*{84e05bfa-cbaf-4f0d-bfb6-4ce85742a57e}*SharedItemsImports = 9 + Chakra\Chakra.vcxitems*{93792779-4948-4a5d-8ca7-86ed5e3bec27}*SharedItemsImports = 4 + Mso\Mso.vcxitems*{93792779-4948-4a5d-8ca7-86ed5e3bec27}*SharedItemsImports = 4 + Chakra\Chakra.vcxitems*{c38970c0-5fbf-4d69-90d8-cbac225ae895}*SharedItemsImports = 9 + Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{da8b35b3-da00-4b02-bde6-6a397b3fd46b}*SharedItemsImports = 9 + include\Include.vcxitems*{ef074ba1-2d54-4d49-a28e-5e040b47cd2e}*SharedItemsImports = 9 + Chakra\Chakra.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 + Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 + Mso\Mso.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 + Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 + EndGlobalSection +EndGlobal diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index 4fb9b143880..6a914ad9fbe 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -1,6 +1,7 @@ + true true diff --git a/vnext/PropertySheets/Bundle.props b/vnext/PropertySheets/Bundle.props index 6fde14e6fcd..e56fd783e91 100644 --- a/vnext/PropertySheets/Bundle.props +++ b/vnext/PropertySheets/Bundle.props @@ -48,6 +48,7 @@ index.windows.js index.js + $(ProjectDir) $(OutDir) $(ProjectDir)$(OutDir) diff --git a/vnext/PropertySheets/External/Microsoft.ReactNative.CSharp.PackageReferences.props b/vnext/PropertySheets/External/Microsoft.ReactNative.CSharp.PackageReferences.props index 98835eff28c..d25e0474050 100644 --- a/vnext/PropertySheets/External/Microsoft.ReactNative.CSharp.PackageReferences.props +++ b/vnext/PropertySheets/External/Microsoft.ReactNative.CSharp.PackageReferences.props @@ -5,8 +5,17 @@ --> - - - - + + + + + + + + + + + + + diff --git a/vnext/PropertySheets/External/Microsoft.ReactNative.CSharp.ProjectReferences.props b/vnext/PropertySheets/External/Microsoft.ReactNative.CSharp.ProjectReferences.props index 545358bbdc0..7aa0e237509 100644 --- a/vnext/PropertySheets/External/Microsoft.ReactNative.CSharp.ProjectReferences.props +++ b/vnext/PropertySheets/External/Microsoft.ReactNative.CSharp.ProjectReferences.props @@ -11,7 +11,7 @@ Microsoft.ReactNative false - + {F2824844-CE15-4242-9420-308923CD76C3} Microsoft.ReactNative.Managed false diff --git a/vnext/PropertySheets/External/Microsoft.ReactNative.Composition.CSharpApp.props b/vnext/PropertySheets/External/Microsoft.ReactNative.Composition.CSharpApp.props new file mode 100644 index 00000000000..0c7af4bd5f7 --- /dev/null +++ b/vnext/PropertySheets/External/Microsoft.ReactNative.Composition.CSharpApp.props @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + diff --git a/vnext/PropertySheets/External/Microsoft.ReactNative.Composition.CSharpApp.targets b/vnext/PropertySheets/External/Microsoft.ReactNative.Composition.CSharpApp.targets new file mode 100644 index 00000000000..c15f5247465 --- /dev/null +++ b/vnext/PropertySheets/External/Microsoft.ReactNative.Composition.CSharpApp.targets @@ -0,0 +1,54 @@ + + + + + + + + + + + Microsoft.ReactNative + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vnext/ReactCommon.UnitTests/packages.lock.json b/vnext/ReactCommon.UnitTests/packages.lock.json index 847d30e6013..91023cad7e4 100644 --- a/vnext/ReactCommon.UnitTests/packages.lock.json +++ b/vnext/ReactCommon.UnitTests/packages.lock.json @@ -44,19 +44,6 @@ "Microsoft.SourceLink.Common": "1.1.1" } }, - "Microsoft.Windows.SDK.BuildTools": { - "type": "Transitive", - "resolved": "10.0.22621.756", - "contentHash": "7ZL2sFSioYm1Ry067Kw1hg0SCcW5kuVezC2SwjGbcPE61Nn+gTbH86T73G3LcEOVj0S3IZzNuE/29gZvOLS7VA==" - }, - "Microsoft.WindowsAppSDK": { - "type": "Transitive", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - }, "common": { "type": "Project", "dependencies": { @@ -87,7 +74,6 @@ "FollyWin32": "[1.0.0, )", "Microsoft.JavaScript.Hermes": "[0.1.23, )", "Microsoft.SourceLink.GitHub": "[1.1.1, )", - "Microsoft.WindowsAppSDK": "[1.5.240227000, )", "ReactCommon": "[1.0.0, )", "ReactNative.V8Jsi.Windows": "[0.71.8, )", "boost": "[1.83.0, )" @@ -101,45 +87,9 @@ } } }, - "native,Version=v0.0/win": { - "Microsoft.WindowsAppSDK": { - "type": "Transitive", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - } - }, - "native,Version=v0.0/win-arm64": { - "Microsoft.WindowsAppSDK": { - "type": "Transitive", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - } - }, - "native,Version=v0.0/win-x64": { - "Microsoft.WindowsAppSDK": { - "type": "Transitive", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - } - }, - "native,Version=v0.0/win-x86": { - "Microsoft.WindowsAppSDK": { - "type": "Transitive", - "resolved": "1.5.240227000", - "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==", - "dependencies": { - "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756" - } - } - } + "native,Version=v0.0/win": {}, + "native,Version=v0.0/win-arm64": {}, + "native,Version=v0.0/win-x64": {}, + "native,Version=v0.0/win-x86": {} } } \ No newline at end of file diff --git a/vnext/Scripts/Microsoft.ReactNative.nuspec b/vnext/Scripts/Microsoft.ReactNative.nuspec index 476d988c630..fea8549f8f9 100644 --- a/vnext/Scripts/Microsoft.ReactNative.nuspec +++ b/vnext/Scripts/Microsoft.ReactNative.nuspec @@ -41,6 +41,10 @@ + + + + @@ -57,6 +61,10 @@ + + + + diff --git a/vnext/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 b/vnext/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 index c4739440f38..4d6fedda638 100644 --- a/vnext/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 +++ b/vnext/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 @@ -8,7 +8,7 @@ Set-Location -Path $RepoRoot try { - $packagesSolutions = Get-ChildItem -File -Recurse -Path packages *.sln | Where-Object { !$_.FullName.Contains('node_modules') -and !$_.FullName.Contains('e2etest') } + $packagesSolutions = @();#Get-ChildItem -File -Recurse -Path packages *.sln | Where-Object { !$_.FullName.Contains('node_modules') -and !$_.FullName.Contains('e2etest') } $vnextSolutions = Get-ChildItem -File -Path vnext *.sln # Run all solutions with their defaults @@ -16,12 +16,6 @@ try Write-Host Restoring $_.FullName with defaults & msbuild /t:Restore /p:RestoreForceEvaluate=true $_.FullName } - - # Re-run solutions that we also build a Fabric variant - @("$RepoRoot\vnext\ReactWindows-Desktop.sln", "$RepoRoot\vnext\Microsoft.ReactNative.CppOnly.slnf") | Foreach { - Write-Host Restoring $_ with Fabric - & msbuild /t:Restore /p:RestoreForceEvaluate=true /p:UseFabric=true /p:UseWinUI3=true $_ - } } finally { diff --git a/vnext/templates/cs-app/NuGet_Config b/vnext/templates/cs-app/NuGet_Config new file mode 100644 index 00000000000..3999764daf2 --- /dev/null +++ b/vnext/templates/cs-app/NuGet_Config @@ -0,0 +1,13 @@ + + + + +{{#addReactNativePublicAdoFeed}} + +{{/addReactNativePublicAdoFeed}} + + + + + + diff --git a/vnext/templates/cs-app/jest.config.windows.js b/vnext/templates/cs-app/jest.config.windows.js new file mode 100644 index 00000000000..4ae04e8b489 --- /dev/null +++ b/vnext/templates/cs-app/jest.config.windows.js @@ -0,0 +1,3 @@ +const config = {}; + +module.exports = require('@rnx-kit/jest-preset')('windows', config); diff --git a/vnext/templates/cs-app/metro.config.js b/vnext/templates/cs-app/metro.config.js new file mode 100644 index 00000000000..9b895505533 --- /dev/null +++ b/vnext/templates/cs-app/metro.config.js @@ -0,0 +1,54 @@ +const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); + +const fs = require('fs'); +const path = require('path'); +const exclusionList = require('metro-config/src/defaults/exclusionList'); + +const rnwPath = fs.realpathSync( + path.resolve(require.resolve('react-native-windows/package.json'), '..'), +); + +//{{#devMode}} [devMode +const rnwRootNodeModules = path.resolve(rnwPath, '..', 'node_modules'); +const rnwPackages = path.resolve(rnwPath, '..', 'packages'); +// devMode]{{/devMode}} + +/** + * Metro configuration + * https://facebook.github.io/metro/docs/configuration + * + * @type {import('metro-config').MetroConfig} + */ + +const config = { + //{{#devMode}} [devMode + watchFolders: [rnwPath, rnwRootNodeModules, rnwPackages], + // devMode]{{/devMode}} + resolver: { + blockList: exclusionList([ + // This stops "npx @react-native-community/cli run-windows" from causing the metro server to crash if its already running + new RegExp( + `${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`, + ), + // This prevents "npx @react-native-community/cli run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild + new RegExp(`${rnwPath}/build/.*`), + new RegExp(`${rnwPath}/target/.*`), + /.*\.ProjectImports\.zip/, + ]), + //{{#devMode}} [devMode + extraNodeModules: { + 'react-native-windows': rnwPath, + }, + // devMode]{{/devMode}} + }, + transformer: { + getTransformOptions: async () => ({ + transform: { + experimentalImportSupport: false, + inlineRequires: true, + }, + }), + }, +}; + +module.exports = mergeConfig(getDefaultConfig(__dirname), config); diff --git a/vnext/templates/cs-app/template.config.js b/vnext/templates/cs-app/template.config.js new file mode 100644 index 00000000000..81e2d3fd701 --- /dev/null +++ b/vnext/templates/cs-app/template.config.js @@ -0,0 +1,137 @@ +/** + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * @ts check + * @format + */ + +const chalk = require('chalk'); +const crypto = require('crypto'); +const existsSync = require('fs').existsSync; +const path = require('path'); +const username = require('username'); +const util = require('util'); + +const glob = util.promisify(require('glob')); + +const templateUtils = require('../templateUtils'); + +async function preInstall(config = {}, options = {}) {} + +async function getFileMappings(config = {}, options = {}) { + const projectRoot = config?.root ?? process.cwd(); + const {rnwPath, rnwVersion, devMode, isCanary} = templateUtils.getRnwInfo(config, options); + + const projectName = + config?.project?.windows?.project?.projectName ?? options?.name ?? 'MyApp'; + const namespace = options?.namespace ?? projectName; + const projectGuid = + config?.project?.windows?.project?.projectGuid + ?.replace('{', '') + .replace('}', '') ?? crypto.randomUUID(); + const packageGuid = crypto.randomUUID(); + const currentUser = username.sync(); // Gets the current username depending on the platform. + + const appJsonPath = path.join(config?.root ?? process.cwd(), 'app.json'); + const mainComponentName = + (existsSync(appJsonPath) ? require(appJsonPath).name : null) ?? projectName; + + const csharpNugetPackages = []; + + const replacements = { + useMustache: true, + regExpPatternsToRemove: [], + + name: projectName, + namespace: namespace, + + rnwVersion: rnwVersion, + rnwPathFromProjectRoot: path.relative(projectRoot, rnwPath).replace(/\//g, '\\'), + + mainComponentName, + + // Visual Studio is very picky about the casing of the guids for projects, project references and the solution + // https://www.bing.com/search?q=visual+studio+project+guid+casing&cvid=311a5ad7f9fc41089507b24600d23ee7&FORM=ANAB01&PC=U531 + // we therefore have to precariously use the right casing in the right place or risk building in VS breaking. + projectGuidLower: `{${projectGuid.toLowerCase()}}`, + projectGuidUpper: `{${projectGuid.toUpperCase()}}`, + + // packaging and signing variables: + packageGuidLower: `{${packageGuid.toLowerCase()}}`, + packageGuidUpper: `{${packageGuid.toUpperCase()}}`, + currentUser, + + devMode, + + useNuGets: devMode, // default is to use published NuGets except in devMode, change to true here if you want to test devMode and nugets simultaneously + addReactNativePublicAdoFeed: isCanary, + + cppNugetPackages: csharpNugetPackages, + }; + + let fileMappings = []; + + const templateFiles = await glob('**/*', { + cwd: __dirname, + ignore: 'template.config.js', + nodir: true, + }); + + for (const file of templateFiles) { + const fileMapping = { + from: path.resolve(__dirname, path.normalize(file)), + to: path.normalize(file), + replacements, + }; + + // Perform simple file renames + const fileName = path.basename(fileMapping.to); + switch (fileName) { + case '_gitignore': + fileMapping.to = path.join(path.dirname(fileMapping.to), '.gitignore'); + break; + case 'NuGet_Config': + fileMapping.to = path.join( + path.dirname(fileMapping.to), + 'NuGet.config', + ); + break; + } + + // Rename files with MyApp in the name + fileMapping.to = fileMapping.to.replace(/MyApp/g, projectName); + + fileMappings.push(fileMapping); + } + + return fileMappings; +} + +async function postInstall(config = {}, options = {}) { + // Update package.json with new scripts and dependencies + await templateUtils.updateProjectPackageJson(config, options, { + scripts: { + windows: 'npx @react-native-community/cli run-windows', + 'test:windows': 'jest --config jest.config.windows.js', + }, + devDependencies: { + '@rnx-kit/jest-preset': '^0.1.17', + }, + }); + + // Install recently added dependencies + await templateUtils.runNpmInstall(config, options); + + console.log(chalk.white.bold('To run your new windows app:')); + console.log(chalk.white(' npx @react-native-community/cli run-windows')); +} + +module.exports = { + name: 'React Native Windows Application (New Arch, C#, Win32, Hermes)', + description: + "[Experimental] A RNW app targeting RN's new architecture, with the Hermes JS engine.", + preInstall, + getFileMappings, + postInstall, +}; diff --git a/vnext/templates/cs-app/windows/ExperimentalFeatures.props b/vnext/templates/cs-app/windows/ExperimentalFeatures.props new file mode 100644 index 00000000000..44bf23f5066 --- /dev/null +++ b/vnext/templates/cs-app/windows/ExperimentalFeatures.props @@ -0,0 +1,12 @@ + + + + + true + true + {{useNuGets}} + + true + + + diff --git a/vnext/templates/cs-app/windows/MyApp.Package/Images/LockScreenLogo.scale-200.png b/vnext/templates/cs-app/windows/MyApp.Package/Images/LockScreenLogo.scale-200.png new file mode 100644 index 00000000000..735f57adb5d Binary files /dev/null and b/vnext/templates/cs-app/windows/MyApp.Package/Images/LockScreenLogo.scale-200.png differ diff --git a/vnext/templates/cs-app/windows/MyApp.Package/Images/SplashScreen.scale-200.png b/vnext/templates/cs-app/windows/MyApp.Package/Images/SplashScreen.scale-200.png new file mode 100644 index 00000000000..023e7f1feda Binary files /dev/null and b/vnext/templates/cs-app/windows/MyApp.Package/Images/SplashScreen.scale-200.png differ diff --git a/vnext/templates/cs-app/windows/MyApp.Package/Images/Square150x150Logo.scale-200.png b/vnext/templates/cs-app/windows/MyApp.Package/Images/Square150x150Logo.scale-200.png new file mode 100644 index 00000000000..af49fec1a54 Binary files /dev/null and b/vnext/templates/cs-app/windows/MyApp.Package/Images/Square150x150Logo.scale-200.png differ diff --git a/vnext/templates/cs-app/windows/MyApp.Package/Images/Square44x44Logo.scale-200.png b/vnext/templates/cs-app/windows/MyApp.Package/Images/Square44x44Logo.scale-200.png new file mode 100644 index 00000000000..ce342a2ec8a Binary files /dev/null and b/vnext/templates/cs-app/windows/MyApp.Package/Images/Square44x44Logo.scale-200.png differ diff --git a/vnext/templates/cs-app/windows/MyApp.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png b/vnext/templates/cs-app/windows/MyApp.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 00000000000..f6c02ce97e0 Binary files /dev/null and b/vnext/templates/cs-app/windows/MyApp.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/vnext/templates/cs-app/windows/MyApp.Package/Images/StoreLogo.png b/vnext/templates/cs-app/windows/MyApp.Package/Images/StoreLogo.png new file mode 100644 index 00000000000..7385b56c0e4 Binary files /dev/null and b/vnext/templates/cs-app/windows/MyApp.Package/Images/StoreLogo.png differ diff --git a/vnext/templates/cs-app/windows/MyApp.Package/Images/Wide310x150Logo.scale-200.png b/vnext/templates/cs-app/windows/MyApp.Package/Images/Wide310x150Logo.scale-200.png new file mode 100644 index 00000000000..288995b397f Binary files /dev/null and b/vnext/templates/cs-app/windows/MyApp.Package/Images/Wide310x150Logo.scale-200.png differ diff --git a/vnext/templates/cs-app/windows/MyApp.Package/MyApp.Package.wapproj b/vnext/templates/cs-app/windows/MyApp.Package/MyApp.Package.wapproj new file mode 100644 index 00000000000..72310a06731 --- /dev/null +++ b/vnext/templates/cs-app/windows/MyApp.Package/MyApp.Package.wapproj @@ -0,0 +1,79 @@ + + + + + {{ packageGuidLower }} + en-US + ..\{{ name }}\{{ name }}.vcxproj + NativeOnly + NativeOnly + + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ + + + + $(MSBuildExtensionsPath)\Microsoft\DesktopBridge\ + + + + + Debug + x86 + + + Release + x86 + + + Debug + x64 + + + Release + x64 + + + Debug + ARM64 + + + Release + ARM64 + + + + + + + + Designer + + + + + + + + + + + + + + True + Properties\PublishProfiles\win-$(Platform).pubxml + + + + + + + + + This project references targets in your node_modules\react-native-windows folder that are missing. The missing file is {0}. + + + + + diff --git a/vnext/templates/cs-app/windows/MyApp.Package/Package.appxmanifest b/vnext/templates/cs-app/windows/MyApp.Package/Package.appxmanifest new file mode 100644 index 00000000000..bf7f6e6c121 --- /dev/null +++ b/vnext/templates/cs-app/windows/MyApp.Package/Package.appxmanifest @@ -0,0 +1,49 @@ + + + + + + + + {{ name }} + {{ currentUser }} + Images\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vnext/templates/cs-app/windows/MyApp.sln b/vnext/templates/cs-app/windows/MyApp.sln new file mode 100644 index 00000000000..cfa260e9a99 --- /dev/null +++ b/vnext/templates/cs-app/windows/MyApp.sln @@ -0,0 +1,186 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32929.385 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "{{ name }}.Package", "{{ name }}.Package\{{ name }}.Package.wapproj", "{{ packageGuidUpper }}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{ name }}", "{{ name }}\{{ name }}.csproj", "{{ projectGuidUpper }}" +{{^useNuGets}} + ProjectSection(ProjectDependencies) = postProject + {F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {F7D32BD0-2749-483E-9A0D-1635EF7E3136} + EndProjectSection +{{/useNuGets}} +EndProject +{{^useNuGets}} +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folly", "..\{{ rnwPathFromProjectRoot }}\Folly\Folly.vcxproj", "{A990658C-CE31-4BCC-976F-0FC6B1AF693D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fmt", "..\{{ rnwPathFromProjectRoot }}\fmt\fmt.vcxproj", "{14B93DC8-FD93-4A6D-81CB-8BC96644501C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactCommon", "..\{{ rnwPathFromProjectRoot }}\ReactCommon\ReactCommon.vcxproj", "{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}" + ProjectSection(ProjectDependencies) = postProject + {A990658C-CE31-4BCC-976F-0FC6B1AF693D} = {A990658C-CE31-4BCC-976F-0FC6B1AF693D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra", "..\{{ rnwPathFromProjectRoot }}\Chakra\Chakra.vcxitems", "{C38970C0-5FBF-4D69-90D8-CBAC225AE895}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative", "..\{{ rnwPathFromProjectRoot }}\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj", "{F7D32BD0-2749-483E-9A0D-1635EF7E3136}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.Cxx", "..\{{ rnwPathFromProjectRoot }}\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems", "{DA8B35B3-DA00-4B02-BDE6-6A397B3FD46B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\{{ rnwPathFromProjectRoot }}\Common\Common.vcxproj", "{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ReactNative", "ReactNative", "{5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.Shared", "..\{{ rnwPathFromProjectRoot }}\Shared\Shared.vcxitems", "{2049DBE9-8D13-42C9-AE4B-413AE38FFFD0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mso", "..\{{ rnwPathFromProjectRoot }}\Mso\Mso.vcxitems", "{84E05BFA-CBAF-4F0D-BFB6-4CE85742A57E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Include", "..\{{ rnwPathFromProjectRoot }}\include\Include.vcxitems", "{EF074BA1-2D54-4D49-A28E-5E040B47CD2E}" +EndProject +{{/useNuGets}} +Global +{{^useNuGets}} + GlobalSection(SharedMSBuildProjectFiles) = preSolution + ..\{{ rnwPathFromProjectRoot }}\Shared\Shared.vcxitems*{2049dbe9-8d13-42c9-ae4b-413ae38fffd0}*SharedItemsImports = 9 + ..\{{ rnwPathFromProjectRoot }}\Mso\Mso.vcxitems*{84e05bfa-cbaf-4f0d-bfb6-4ce85742a57e}*SharedItemsImports = 9 + ..\{{ rnwPathFromProjectRoot }}\Chakra\Chakra.vcxitems*{c38970c0-5fbf-4d69-90d8-cbac225ae895}*SharedItemsImports = 9 + ..\{{ rnwPathFromProjectRoot }}\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{da8b35b3-da00-4b02-bde6-6a397b3fd46b}*SharedItemsImports = 9 + ..\{{ rnwPathFromProjectRoot }}\include\Include.vcxitems*{ef074ba1-2d54-4d49-a28e-5e040b47cd2e}*SharedItemsImports = 9 + ..\{{ rnwPathFromProjectRoot }}\Chakra\Chakra.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 + ..\{{ rnwPathFromProjectRoot }}\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 + ..\{{ rnwPathFromProjectRoot }}\Mso\Mso.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 + ..\{{ rnwPathFromProjectRoot }}\Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 + EndGlobalSection +{{/useNuGets}} + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Debug|ARM64 = Debug|ARM64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + Release|ARM64 = Release|ARM64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {{ packageGuidUpper }}.Debug|x64.ActiveCfg = Debug|x64 + {{ packageGuidUpper }}.Debug|x64.Build.0 = Debug|x64 + {{ packageGuidUpper }}.Debug|x64.Deploy.0 = Debug|x64 + {{ packageGuidUpper }}.Debug|x86.ActiveCfg = Debug|x86 + {{ packageGuidUpper }}.Debug|x86.Build.0 = Debug|x86 + {{ packageGuidUpper }}.Debug|x86.Deploy.0 = Debug|x86 + {{ packageGuidUpper }}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {{ packageGuidUpper }}.Debug|ARM64.Build.0 = Debug|ARM64 + {{ packageGuidUpper }}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {{ packageGuidUpper }}.Release|x64.ActiveCfg = Release|x64 + {{ packageGuidUpper }}.Release|x64.Build.0 = Release|x64 + {{ packageGuidUpper }}.Release|x64.Deploy.0 = Release|x64 + {{ packageGuidUpper }}.Release|x86.ActiveCfg = Release|x86 + {{ packageGuidUpper }}.Release|x86.Build.0 = Release|x86 + {{ packageGuidUpper }}.Release|x86.Deploy.0 = Release|x86 + {{ packageGuidUpper }}.Release|ARM64.ActiveCfg = Release|ARM64 + {{ packageGuidUpper }}.Release|ARM64.Build.0 = Release|ARM64 + {{ packageGuidUpper }}.Release|ARM64.Deploy.0 = Release|ARM64 + {{ projectGuidUpper }}.Debug|x64.ActiveCfg = Debug|x64 + {{ projectGuidUpper }}.Debug|x64.Build.0 = Debug|x64 + {{ projectGuidUpper }}.Debug|x64.Deploy.0 = Debug|x64 + {{ projectGuidUpper }}.Debug|x86.ActiveCfg = Debug|Win32 + {{ projectGuidUpper }}.Debug|x86.Build.0 = Debug|Win32 + {{ projectGuidUpper }}.Debug|x86.Deploy.0 = Debug|Win32 + {{ projectGuidUpper }}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {{ projectGuidUpper }}.Debug|ARM64.Build.0 = Debug|ARM64 + {{ projectGuidUpper }}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {{ projectGuidUpper }}.Release|x64.ActiveCfg = Release|x64 + {{ projectGuidUpper }}.Release|x64.Build.0 = Release|x64 + {{ projectGuidUpper }}.Release|x64.Deploy.0 = Release|x64 + {{ projectGuidUpper }}.Release|x86.ActiveCfg = Release|Win32 + {{ projectGuidUpper }}.Release|x86.Build.0 = Release|Win32 + {{ projectGuidUpper }}.Release|x86.Deploy.0 = Release|Win32 + {{ projectGuidUpper }}.Release|ARM64.ActiveCfg = Release|ARM64 + {{ projectGuidUpper }}.Release|ARM64.Build.0 = Release|ARM64 + {{ projectGuidUpper }}.Release|ARM64.Deploy.0 = Release|ARM64 +{{^useNuGets}} + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.Build.0 = Debug|ARM64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.ActiveCfg = Debug|x64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.Build.0 = Debug|x64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.ActiveCfg = Debug|Win32 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.Build.0 = Debug|Win32 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.ActiveCfg = Release|ARM64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.Build.0 = Release|ARM64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.ActiveCfg = Release|x64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.Build.0 = Release|x64 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.ActiveCfg = Release|Win32 + {A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.Build.0 = Release|Win32 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.Build.0 = Debug|ARM64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.ActiveCfg = Debug|x64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.Build.0 = Debug|x64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.ActiveCfg = Debug|Win32 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.Build.0 = Debug|Win32 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.ActiveCfg = Release|ARM64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.Build.0 = Release|ARM64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.ActiveCfg = Release|x64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.Build.0 = Release|x64 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.ActiveCfg = Release|Win32 + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.Build.0 = Release|Win32 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.Build.0 = Debug|ARM64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.ActiveCfg = Debug|x64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.Build.0 = Debug|x64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.ActiveCfg = Debug|Win32 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.Build.0 = Debug|Win32 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.ActiveCfg = Release|ARM64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.Build.0 = Release|ARM64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.ActiveCfg = Release|x64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.Build.0 = Release|x64 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.ActiveCfg = Release|Win32 + {F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.Build.0 = Release|Win32 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.Build.0 = Debug|ARM64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.ActiveCfg = Debug|x64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.Build.0 = Debug|x64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.ActiveCfg = Debug|Win32 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.Build.0 = Debug|Win32 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.ActiveCfg = Release|ARM64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.Build.0 = Release|ARM64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.ActiveCfg = Release|x64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.Build.0 = Release|x64 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.ActiveCfg = Release|Win32 + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.Build.0 = Release|Win32 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Debug|ARM64.Build.0 = Debug|ARM64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Debug|x64.ActiveCfg = Debug|x64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Debug|x64.Build.0 = Debug|x64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Debug|x86.ActiveCfg = Debug|Win32 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Debug|x86.Build.0 = Debug|Win32 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Debug|x86.Deploy.0 = Debug|Win32 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|ARM64.ActiveCfg = Release|ARM64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|ARM64.Build.0 = Release|ARM64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|x64.ActiveCfg = Release|x64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|x64.Build.0 = Release|x64 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|x86.ActiveCfg = Release|Win32 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|x86.Build.0 = Release|Win32 + {14B93DC8-FD93-4A6D-81CB-8BC96644501C}.Release|x86.Deploy.0 = Release|Win32 +{{/useNuGets}} + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +{{^useNuGets}} + GlobalSection(NestedProjects) = preSolution + {A990658C-CE31-4BCC-976F-0FC6B1AF693D} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {C38970C0-5FBF-4D69-90D8-CBAC225AE895} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {DA8B35B3-DA00-4B02-BDE6-6A397B3FD46B} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {2049DBE9-8D13-42C9-AE4B-413AE38FFFD0} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {84E05BFA-CBAF-4F0D-BFB6-4CE85742A57E} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {EF074BA1-2D54-4D49-A28E-5E040B47CD2E} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + {14B93DC8-FD93-4A6D-81CB-8BC96644501C} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1} + EndGlobalSection +{{/useNuGets}} + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D43FAD39-F619-437D-BB40-04A3982ACB6A} + EndGlobalSection +EndGlobal diff --git a/vnext/templates/cs-app/windows/MyApp/AutolinkedNativeModules.g.cs b/vnext/templates/cs-app/windows/MyApp/AutolinkedNativeModules.g.cs new file mode 100644 index 00000000000..56270f2f547 --- /dev/null +++ b/vnext/templates/cs-app/windows/MyApp/AutolinkedNativeModules.g.cs @@ -0,0 +1,15 @@ +// AutolinkedNativeModules.g.cs contents generated by "npx @react-native-community/cli autolink-windows" + +using System.Collections.Generic;{{ &autolinkCsUsingNamespaces }} + +using Microsoft.ReactNative; + +namespace Microsoft.ReactNative.Managed +{ + internal static class AutolinkedNativeModules + { + internal static void RegisterAutolinkedNativeModulePackages(IList packageProviders) + { {{ &autolinkCsReactPackageProviders }} + } + } +} diff --git a/vnext/templates/cs-app/windows/MyApp/MyApp.csproj b/vnext/templates/cs-app/windows/MyApp/MyApp.csproj new file mode 100644 index 00000000000..e607fbdbfc2 --- /dev/null +++ b/vnext/templates/cs-app/windows/MyApp/MyApp.csproj @@ -0,0 +1,40 @@ + + + + net6.0-windows10.0.22621.0 + {{ name }} + {{ projectGuidUpper }} + WinExe + {{ name }} + app.manifest + {{ name }}.ico + + + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ + + + + + + + + + + + + + + + {{#csharpNugetPackages}} + + {{/csharpNugetPackages}} + + + + This project references targets in your node_modules\react-native-windows folder. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/vnext/templates/cs-app/windows/MyApp/MyApp.ico b/vnext/templates/cs-app/windows/MyApp/MyApp.ico new file mode 100644 index 00000000000..b3ec03bd617 Binary files /dev/null and b/vnext/templates/cs-app/windows/MyApp/MyApp.ico differ diff --git a/vnext/templates/cs-app/windows/MyApp/Program.cs b/vnext/templates/cs-app/windows/MyApp/Program.cs new file mode 100644 index 00000000000..48b10da47c2 --- /dev/null +++ b/vnext/templates/cs-app/windows/MyApp/Program.cs @@ -0,0 +1,63 @@ +// {{ name }}.cs : Defines the entry point for the application. +// + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +using Microsoft.ReactNative; + +namespace {{ namespace }} +{ + class Program + { + static void Main(string[] args) + { + AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; + + var appDirectory = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + + var reactInstanceSettingsBuilder = new ReactInstanceSettingsBuilder() + .DebugBundlePath("index") + .JavaScriptBundleFile("index.windows") + .BundleRootPath(appDirectory) +#if BUNDLE + .UseFastRefresh(false) +#else + .UseFastRefresh(true) +#endif +#if _DEBUG + .UseDirectDebugger(true) + .UseDeveloperSupport(true); +#else + .UseDirectDebugger(false) + .UseDeveloperSupport(false); +#endif + + var reactPackageProviders = new List(); + Microsoft.ReactNative.Managed.AutolinkedNativeModules.RegisterAutolinkedNativeModulePackages(reactPackageProviders); + + var viewOptions = new ReactViewOptions(); + viewOptions.ComponentName = "{{ mainComponentName }}"; + + // Initialize and Manage the ReactNativeHost + var reactNativeAppBuilder = new ReactNativeAppBuilder() + .AddPackageProviders(reactPackageProviders) + .SetReactInstanceSettings(reactInstanceSettingsBuilder.ReactInstanceSettings) + .SetReactViewOptions(viewOptions); + + // Start the react-native instance by creating a javascript runtime and load the bundle. + var reactNativeWin32App = reactNativeAppBuilder.Build(); + + reactNativeWin32App.Start(); + } + + private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) + { + Trace.TraceError($"Unhandled Exception: { (e.ExceptionObject as Exception)?.ToString() }"); + } + } + +} \ No newline at end of file diff --git a/vnext/templates/cs-app/windows/MyApp/Properties/PublishProfiles/win-arm64.pubxml b/vnext/templates/cs-app/windows/MyApp/Properties/PublishProfiles/win-arm64.pubxml new file mode 100644 index 00000000000..06da89e11fb --- /dev/null +++ b/vnext/templates/cs-app/windows/MyApp/Properties/PublishProfiles/win-arm64.pubxml @@ -0,0 +1,19 @@ + + + + + FileSystem + ARM64 + win-arm64 + win10-arm64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + False + True + False + True + + \ No newline at end of file diff --git a/vnext/templates/cs-app/windows/MyApp/Properties/PublishProfiles/win-x64.pubxml b/vnext/templates/cs-app/windows/MyApp/Properties/PublishProfiles/win-x64.pubxml new file mode 100644 index 00000000000..3568f8d8ddc --- /dev/null +++ b/vnext/templates/cs-app/windows/MyApp/Properties/PublishProfiles/win-x64.pubxml @@ -0,0 +1,19 @@ + + + + + FileSystem + x64 + win-x64 + win10-x64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + False + True + False + True + + \ No newline at end of file diff --git a/vnext/templates/cs-app/windows/MyApp/Properties/PublishProfiles/win-x86.pubxml b/vnext/templates/cs-app/windows/MyApp/Properties/PublishProfiles/win-x86.pubxml new file mode 100644 index 00000000000..4ed30a5eed4 --- /dev/null +++ b/vnext/templates/cs-app/windows/MyApp/Properties/PublishProfiles/win-x86.pubxml @@ -0,0 +1,19 @@ + + + + + FileSystem + x86 + win-x86 + win10-x86 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + False + True + False + True + + \ No newline at end of file diff --git a/vnext/templates/cs-app/windows/MyApp/_gitignore b/vnext/templates/cs-app/windows/MyApp/_gitignore new file mode 100644 index 00000000000..82fabe9662a --- /dev/null +++ b/vnext/templates/cs-app/windows/MyApp/_gitignore @@ -0,0 +1 @@ +/Bundle \ No newline at end of file diff --git a/vnext/templates/cs-app/windows/MyApp/app.manifest b/vnext/templates/cs-app/windows/MyApp/app.manifest new file mode 100644 index 00000000000..06d300641de --- /dev/null +++ b/vnext/templates/cs-app/windows/MyApp/app.manifest @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + PerMonitorV2 + + + \ No newline at end of file diff --git a/vnext/templates/cs-app/windows/_gitignore b/vnext/templates/cs-app/windows/_gitignore new file mode 100644 index 00000000000..5bc72a4416d --- /dev/null +++ b/vnext/templates/cs-app/windows/_gitignore @@ -0,0 +1,41 @@ +*AppPackages* +*BundleArtifacts* + +#OS junk files +[Tt]humbs.db +*.DS_Store + +#Visual Studio files +*.[Oo]bj +*.user +*.aps +*.pch +*.vspscc +*.vssscc +*_i.c +*_p.c +*.ncb +*.suo +*.tlb +*.tlh +*.bak +*.[Cc]ache +*.ilk +*.log +*.lib +*.sbr +*.sdf +*.opensdf +*.opendb +*.unsuccessfulbuild +ipch/ +[Oo]bj/ +[Bb]in +[Dd]ebug*/ +[Rr]elease*/ +Ankh.NoLoad +.vs/ +# Visual C++ cache files + +#Files generated by the VS build +**/Generated Files/**