react-native-windows 0.0.0-canary.656 → 0.0.0-canary.657

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.0.0-canary.656</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.0.0-canary.657</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>0</ReactNativeWindowsMinor>
16
16
  <ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>true</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>8e12ccc82efc6d981ffcefecb70a15504fdf0cb2</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>31e90ef4d20203a35b7ebb2353b0adbe2686fe6e</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
@@ -81,6 +81,8 @@ $vsWorkloads = @('Microsoft.VisualStudio.Workload.ManagedDesktop',
81
81
  $vsAll = ($vsComponents + $vsWorkloads);
82
82
 
83
83
  # The minimum VS version to check for
84
+ # Note: For install to work, whatever min version you specify here must be met by the current package available on choco.
85
+ # I.E. Do NOT specify a Preview version here because choco doesn't have VS Preview packages.
84
86
  $vsver = "17.3";
85
87
 
86
88
  # The exact .NET SDK version to check for
@@ -177,16 +179,34 @@ function CheckVS {
177
179
  return $result;
178
180
  }
179
181
 
182
+ function GetVSChannelAndProduct {
183
+ param(
184
+ [string]$VsWhere
185
+ )
186
+
187
+ if ($VsWhere -ne $null) {
188
+ $channelId = & $VsWhere -version $vsver -property channelId;
189
+ $productId = & $VsWhere -version $vsver -property productId;
190
+
191
+ # Channel/product not found, check one more time for pre-release
192
+ if (($channelId -eq $null) -or ($productId -eq $null)) {
193
+ $channelId = & $VsWhere -version $vsver -property channelId -prerelease;
194
+ $productId = & $VsWhere -version $vsver -property productId -prerelease;
195
+ }
196
+
197
+ return $channelId, $productId;
198
+ }
199
+
200
+ return $null, $null;
201
+ }
202
+
180
203
  function InstallVS {
181
204
  $vsWhere = Get-VSWhere;
182
-
183
- if ($vsWhere -ne $null) {
184
- $channelId = & $vsWhere -version $vsver -property channelId;
185
- $productId = & $vsWhere -version $vsver -property productId;
186
- }
205
+
206
+ $channelId, $productId = GetVSChannelAndProduct -VsWhere $vsWhere
187
207
 
188
208
  if (($vsWhere -eq $null) -or ($channelId -eq $null) -or ($productId -eq $null)) {
189
- # No VSWhere / VS_Installer
209
+ # No VSWhere / VS_Installer, try to install
190
210
 
191
211
  EnsureChocoForInstall;
192
212
 
@@ -199,8 +219,12 @@ function InstallVS {
199
219
 
200
220
  $vsWhere = Get-VSWhere;
201
221
 
202
- $channelId = & $vsWhere -version $vsver -property channelId;
203
- $productId = & $vsWhere -version $vsver -property productId;
222
+ $channelId, $productId = GetVSChannelAndProduct -VsWhere $vsWhere
223
+ }
224
+
225
+ # Final check before attempting install
226
+ if (($vsWhere -eq $null) -or ($channelId -eq $null) -or ($productId -eq $null)) {
227
+ throw "Unable to find or install a compatible version of Visual Studio >= ($vsver).";
204
228
  }
205
229
 
206
230
  $vsInstaller = Join-Path -Path (Split-Path -Parent $vsWhere) -ChildPath "vs_installer.exe";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.0.0-canary.656",
3
+ "version": "0.0.0-canary.657",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "@react-native-community/cli": "12.0.0-alpha.3",
27
27
  "@react-native-community/cli-platform-android": "12.0.0-alpha.3",
28
28
  "@react-native-community/cli-platform-ios": "12.0.0-alpha.3",
29
- "@react-native-windows/cli": "0.0.0-canary.170",
29
+ "@react-native-windows/cli": "0.0.0-canary.171",
30
30
  "@react-native/assets": "1.0.0",
31
31
  "@react-native/assets-registry": "^0.73.0",
32
32
  "@react-native/codegen": "^0.73.0",