From b3d694d8ac3c069949f523a8eb71896c7b15570f Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 19 May 2026 19:46:54 -0700 Subject: [PATCH 01/11] Update deps script. TODO: test --- vnext/Scripts/rnw-dependencies.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vnext/Scripts/rnw-dependencies.ps1 b/vnext/Scripts/rnw-dependencies.ps1 index a57d7809f5c..1353332016f 100644 --- a/vnext/Scripts/rnw-dependencies.ps1 +++ b/vnext/Scripts/rnw-dependencies.ps1 @@ -8,7 +8,7 @@ param( [string]$Check = [CheckId]::All, [Parameter(ValueFromRemainingArguments)] - [ValidateSet('appDev', 'rnwDev', 'buildLab', 'vs2022', 'clone')] + [ValidateSet('appDev', 'rnwDev', 'buildLab', 'vs2026', 'clone')] [String[]]$Tags = @('appDev'), [switch]$Enterprise = $false ) @@ -113,7 +113,7 @@ $wingetver = "1.7.11261"; # The minimum VS version to check for # Note: For install to work, whatever min version you specify here must be met by the current package available on winget. -$vsver = "17.11.0"; +$vsver = "18.6.0"; # The exact .NET SDK version to check for $dotnetver = "8.0"; @@ -242,9 +242,9 @@ function InstallVS { if ($Enterprise) { # The CI machines need the enterprise version of VS as that is what is hardcoded in all the scripts - WinGetInstall Microsoft.VisualStudio.2022.Enterprise + WinGetInstall Microsoft.VisualStudio.Enterprise } else { - WinGetInstall Microsoft.VisualStudio.2022.Community + WinGetInstall Microsoft.VisualStudio.Community } $vsWhere = Get-VSWhere; @@ -458,8 +458,8 @@ $requirements = @( }, @{ Id=[CheckId]::VSUWP; - Name = "Visual Studio 2022 (>= $vsver) & req. components"; - Tags = @('appDev', 'vs2022'); + Name = "Visual Studio 2026 (>= $vsver) & req. components"; + Tags = @('appDev', 'vs2026'); Valid = { CheckVS; } Install = { InstallVS }; HasVerboseOutput = $true; From cbd83c4ddefe7bf6aa1d9bfdc9ea30846eec6980 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 20 May 2026 01:37:59 -0700 Subject: [PATCH 02/11] Upgrade rnw-deps to .NET 10 --- vnext/Scripts/rnw-dependencies.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnext/Scripts/rnw-dependencies.ps1 b/vnext/Scripts/rnw-dependencies.ps1 index 1353332016f..b8d224fe81a 100644 --- a/vnext/Scripts/rnw-dependencies.ps1 +++ b/vnext/Scripts/rnw-dependencies.ps1 @@ -116,9 +116,9 @@ $wingetver = "1.7.11261"; $vsver = "18.6.0"; # The exact .NET SDK version to check for -$dotnetver = "8.0"; +$dotnetver = "10.0"; # Version name of the winget package -$wingetDotNetVer = "8"; +$wingetDotNetVer = "10"; $v = [System.Environment]::OSVersion.Version; if ($env:Agent_BuildDirectory) { From d8f3b11d79a33ffc204b062080979114aa22fe2a Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 20 May 2026 02:29:24 -0700 Subject: [PATCH 03/11] Defer findPowershell to layoutMSRNCxx --- vnext/just-task.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vnext/just-task.js b/vnext/just-task.js index e10779044fb..ef22fe5fbbd 100644 --- a/vnext/just-task.js +++ b/vnext/just-task.js @@ -45,10 +45,9 @@ function codegen(test) { ); } -const powershell = findPowerShell(); - function layoutMSRNCxx() { if (require('os').platform() === 'win32') { + const powershell = findPowerShell(); execSync( `"${powershell}" -NoProfile .\\Scripts\\Tfs\\Layout-MSRN-Headers.ps1 -GenerateLocalCxx`, { From 0965aa32f3636582aae345a8aaf7a86e5412c00a Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 20 May 2026 11:54:09 -0700 Subject: [PATCH 04/11] Upgrade VS version to 18.6.1 --- vnext/Scripts/rnw-dependencies.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vnext/Scripts/rnw-dependencies.ps1 b/vnext/Scripts/rnw-dependencies.ps1 index b8d224fe81a..3bc5d32d657 100644 --- a/vnext/Scripts/rnw-dependencies.ps1 +++ b/vnext/Scripts/rnw-dependencies.ps1 @@ -113,7 +113,7 @@ $wingetver = "1.7.11261"; # The minimum VS version to check for # Note: For install to work, whatever min version you specify here must be met by the current package available on winget. -$vsver = "18.6.0"; +$vsver = "18.6.1"; # The exact .NET SDK version to check for $dotnetver = "10.0"; @@ -491,7 +491,7 @@ $requirements = @( $downloadPath = "$env:TEMP\WindowsApplicationDriver.msi" Write-Verbose "Downloading WinAppDriver from $url"; Invoke-WebRequest -UseBasicParsing $url -OutFile $downloadPath - + # SDL Compliance: Verify signature (Work Item 58386093) $signature = Get-AuthenticodeSignature $downloadPath if ($signature.Status -ne "Valid") { @@ -499,10 +499,10 @@ $requirements = @( throw "WinAppDriver signature verification failed" } if ($signature.SignerCertificate.Subject -notlike "*Microsoft*") { - Remove-Item $downloadPath -ErrorAction SilentlyContinue + Remove-Item $downloadPath -ErrorAction SilentlyContinue throw "WinAppDriver not signed by Microsoft" } - + & $downloadPath /q Remove-Item $downloadPath -ErrorAction SilentlyContinue }; @@ -600,7 +600,7 @@ function WinGetInstall { Write-Verbose "Executing `winget install `"$wingetPackage`""; & winget install "$wingetPackage" --accept-source-agreements --accept-package-agreements } - + # Refresh PATH environment variable to pick up newly installed tools $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") } @@ -693,12 +693,12 @@ foreach ($req in $filteredRequirements) try { $validAfterInstall = Invoke-Command $req.Valid; } catch { } - + if ($validAfterInstall) { $Installed++; continue; # go to the next item } - + if ($LASTEXITCODE -ne 0) { throw "Last exit code was non-zero: $LASTEXITCODE - $outputFromInstall"; } @@ -737,4 +737,4 @@ if ($NeedsRerun -ne 0) { $Tags | Out-File $MarkerFile; if (!$ShellInvocation) { Read-Host 'Press Enter to exit' } exit 0; -} \ No newline at end of file +} From 579a76fcdf9d987f96e6fae801e8fa1269a1f062 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 20 May 2026 17:44:52 -0700 Subject: [PATCH 05/11] Drop /async in MSVC 14.5 --- .../React.Windows.Desktop.UnitTests.vcxproj | 2 +- .../Microsoft.ReactNative.Cxx.UnitTests.vcxproj | 3 ++- .../Microsoft.ReactNative.IntegrationTests.vcxproj | 3 ++- vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | 3 ++- vnext/Mso.UnitTests/Mso.UnitTests.vcxproj | 3 ++- vnext/PropertySheets/React.Cpp.props | 3 ++- vnext/Shared/Networking/WinRTWebSocketResource.h | 6 +++++- 7 files changed, 16 insertions(+), 7 deletions(-) diff --git a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj index 366f7a86e4f..31aa7684925 100644 --- a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj +++ b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj @@ -79,7 +79,7 @@ $(VCInstallDir)UnitTest\include; %(AdditionalIncludeDirectories) - %(AdditionalOptions) /await + %(AdditionalOptions) /await - /await %(AdditionalOptions) /bigobj /FS + %(AdditionalOptions) /bigobj /FS + %(AdditionalOptions) /await true Cdecl diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index b41c838404b..4502a7a703b 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -96,7 +96,8 @@ $(IntDir)pch.pch pch.h Level4 - /await %(AdditionalOptions) /bigobj /ZH:SHA_256 + %(AdditionalOptions) /bigobj /ZH:SHA_256 + %(AdditionalOptions) /await $(ExternalDir)fmt\include; $(ReactNativeWindowsDir)Microsoft.ReactNative; diff --git a/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj b/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj index 74fb6cc93fa..1609c75d257 100644 --- a/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj +++ b/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj @@ -94,7 +94,8 @@ /bigobj - /FS - Force Synchronous PDB writes. Useful when setting MultiProcCL. --> - /await %(AdditionalOptions) /bigobj /FS + %(AdditionalOptions) /bigobj /FS + %(AdditionalOptions) /await true Cdecl diff --git a/vnext/PropertySheets/React.Cpp.props b/vnext/PropertySheets/React.Cpp.props index ae3fb63bd19..edabc4a699e 100644 --- a/vnext/PropertySheets/React.Cpp.props +++ b/vnext/PropertySheets/React.Cpp.props @@ -136,7 +136,8 @@ ProgramDatabase true true - /utf-8 %(AdditionalOptions) /await + /utf-8 %(AdditionalOptions) + %(AdditionalOptions) /await Guard Spectre diff --git a/vnext/Shared/Networking/WinRTWebSocketResource.h b/vnext/Shared/Networking/WinRTWebSocketResource.h index 8ebdd3b14d0..eafb1c6fbe9 100644 --- a/vnext/Shared/Networking/WinRTWebSocketResource.h +++ b/vnext/Shared/Networking/WinRTWebSocketResource.h @@ -27,8 +27,12 @@ class WinRTWebSocketResource2 : public IWebSocketResource, void operator=(const TaskSequencer &) = delete; private: +// `experimental` is deprecated starting Visual Studio 2026 +#if _MSC_VER >= 1951 + using CoroHandle = std::coroutine_handle<>; +#else using CoroHandle = std::experimental::coroutine_handle<>; - +#endif struct Suspender { CoroHandle m_handle; From ed2d5724090730b94bde36800d7283a42f73acd8 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 20 May 2026 18:30:13 -0700 Subject: [PATCH 06/11] Replace std::future coroutines with WinRT types --- .../Utils/LocalBundleReader.cpp | 20 +++++++++----- .../Utils/LocalBundleReader.h | 6 ++--- vnext/Shared/DevSupportManager.cpp | 26 ++++++++++++------- vnext/Shared/DevSupportManager.h | 1 - 4 files changed, 32 insertions(+), 21 deletions(-) diff --git a/vnext/Microsoft.ReactNative/Utils/LocalBundleReader.cpp b/vnext/Microsoft.ReactNative/Utils/LocalBundleReader.cpp index 5194f68f6de..06aa3cf9aff 100644 --- a/vnext/Microsoft.ReactNative/Utils/LocalBundleReader.cpp +++ b/vnext/Microsoft.ReactNative/Utils/LocalBundleReader.cpp @@ -54,7 +54,9 @@ std::string GetBundleFromEmbeddedResource(const winrt::Windows::Foundation::Uri return std::string(start, start + size); } -std::future LocalBundleReader::LoadBundleAsync(const std::wstring bundleUri) { +winrt::Windows::Foundation::IAsyncAction LocalBundleReader::LoadBundleAsync( + const std::wstring bundleUri, + std::string &result) { try { co_await winrt::resume_background(); @@ -66,7 +68,8 @@ std::future LocalBundleReader::LoadBundleAsync(const std::wstring b file = co_await winrt::Windows::Storage::StorageFile::GetFileFromApplicationUriAsync(uri); } else if (bundleUri.starts_with(L"resource://")) { winrt::Windows::Foundation::Uri uri(bundleUri); - co_return GetBundleFromEmbeddedResource(uri); + result = GetBundleFromEmbeddedResource(uri); + co_return; } else { file = co_await winrt::Windows::Storage::StorageFile::GetFileFromPathAsync(bundleUri); } @@ -87,7 +90,7 @@ std::future LocalBundleReader::LoadBundleAsync(const std::wstring b reinterpret_cast(&script[0]), reinterpret_cast(&script[script.length()])}); dataReader.Close(); - co_return script; + result = std::move(script); } // RuntimeScheduler only handles std::exception or jsi::JSError catch (winrt::hresult_error const &e) { @@ -96,11 +99,13 @@ std::future LocalBundleReader::LoadBundleAsync(const std::wstring b } std::string LocalBundleReader::LoadBundle(const std::wstring &bundlePath) { - return LoadBundleAsync(bundlePath).get(); + std::string result; + LoadBundleAsync(bundlePath, result).get(); + return result; } StorageFileBigString::StorageFileBigString(const std::wstring &path) { - m_futureBuffer = LocalBundleReader::LoadBundleAsync(path); + m_pendingLoad = LocalBundleReader::LoadBundleAsync(path, m_string); } bool StorageFileBigString::isAscii() const { @@ -118,8 +123,9 @@ size_t StorageFileBigString::size() const { } void StorageFileBigString::ensure() const { - if (m_string.empty()) { - m_string = m_futureBuffer.get(); + if (m_pendingLoad) { + m_pendingLoad.get(); + m_pendingLoad = nullptr; } } diff --git a/vnext/Microsoft.ReactNative/Utils/LocalBundleReader.h b/vnext/Microsoft.ReactNative/Utils/LocalBundleReader.h index 8671ebf59ee..978c261367d 100644 --- a/vnext/Microsoft.ReactNative/Utils/LocalBundleReader.h +++ b/vnext/Microsoft.ReactNative/Utils/LocalBundleReader.h @@ -3,14 +3,14 @@ #pragma once #include -#include +#include #include namespace Microsoft::ReactNative { class LocalBundleReader { public: - static std::future LoadBundleAsync(const std::wstring bundlePath); + static winrt::Windows::Foundation::IAsyncAction LoadBundleAsync(const std::wstring bundlePath, std::string &result); static std::string LoadBundle(const std::wstring &bundlePath); }; @@ -24,7 +24,7 @@ class StorageFileBigString : public facebook::react::JSBigString { void ensure() const; private: - mutable std::future m_futureBuffer; + mutable winrt::Windows::Foundation::IAsyncAction m_pendingLoad; mutable std::string m_string; }; diff --git a/vnext/Shared/DevSupportManager.cpp b/vnext/Shared/DevSupportManager.cpp index b485fc1b304..88e27049e57 100644 --- a/vnext/Shared/DevSupportManager.cpp +++ b/vnext/Shared/DevSupportManager.cpp @@ -33,7 +33,6 @@ #include #pragma warning(pop) -#include #include #include @@ -47,7 +46,9 @@ using namespace facebook::react; namespace Microsoft::ReactNative { -std::future> GetJavaScriptFromServerAsync(const std::string &url) { +winrt::Windows::Foundation::IAsyncAction GetJavaScriptFromServerAsync( + const std::string &url, + std::pair &result) { winrt::Windows::Web::Http::Filters::HttpBaseProtocolFilter filter; filter.CacheControl().ReadBehavior(winrt::Windows::Web::Http::Filters::HttpCacheReadBehavior::NoCache); winrt::Windows::Web::Http::HttpClient httpClient(filter); @@ -61,8 +62,9 @@ std::future> GetJavaScriptFromServerAsync(const std try { winrt::Windows::Web::Http::HttpResponseMessage response = co_await asyncRequest; } catch (winrt::hresult_error const &e) { - co_return std::make_pair( + result = std::make_pair( Microsoft::Common::Unicode::Utf16ToUtf8(e.message().c_str(), e.message().size()).c_str(), false); + co_return; } #else co_await lessthrow_await_adapter> GetJavaScriptFromServerAsync(const std } else { error = fmt::format("Error 0x{:x} downloading {}.", static_cast(asyncRequest.ErrorCode()), url); } - co_return std::make_pair(error, false); + result = std::make_pair(error, false); + co_return; } winrt::Windows::Web::Http::HttpResponseMessage response = asyncRequest.GetResults(); @@ -88,7 +91,7 @@ std::future> GetJavaScriptFromServerAsync(const std reader.UnicodeEncoding(winrt::Windows::Storage::Streams::UnicodeEncoding::Utf8); uint32_t len = reader.UnconsumedBufferLength(); - std::string result; + std::string resultStr; if (len > 0 || response.IsSuccessStatusCode()) { std::string data; data.resize(len); @@ -96,12 +99,12 @@ std::future> GetJavaScriptFromServerAsync(const std static_assert( sizeof(buf[0]) == sizeof(data[0]), "perf optimization relies on uint8_t and char being the same size"); reader.ReadBytes(winrt::array_view(buf, buf + len)); - result = std::move(data); + resultStr = std::move(data); } else { - result = fmt::format("HTTP Error {} downloading {}.", static_cast(response.StatusCode()), url); + resultStr = fmt::format("HTTP Error {} downloading {}.", static_cast(response.StatusCode()), url); } - co_return std::make_pair(std::move(result), response.IsSuccessStatusCode()); + result = std::make_pair(std::move(resultStr), response.IsSuccessStatusCode()); } void LaunchDevTools(const facebook::react::DevSettings &settings) { @@ -185,7 +188,8 @@ std::string GetPackageName(const std::string &bundleAppId) { return packageName; } -std::future PollForLiveReload(const std::string &url) { +winrt::Windows::Foundation::IAsyncOperation PollForLiveReload( + const std::string &url) { winrt::Windows::Web::Http::HttpClient httpClient; winrt::Windows::Foundation::Uri uri(Microsoft::Common::Unicode::Utf8ToUtf16(url)); httpClient.DefaultRequestHeaders().Connection().TryParseAdd(L"keep-alive"); @@ -299,7 +303,9 @@ std::pair GetJavaScriptFromServer( inlineSourceMap, hermesBytecodeVersion); try { - return GetJavaScriptFromServerAsync(bundleUrl).get(); + std::pair result; + GetJavaScriptFromServerAsync(bundleUrl, result).get(); + return result; } catch (winrt::hresult_error const &e) { return std::make_pair( "Error: " + Microsoft::Common::Unicode::Utf16ToUtf8(e.message().c_str(), e.message().size()), false); diff --git a/vnext/Shared/DevSupportManager.h b/vnext/Shared/DevSupportManager.h index 216bd6c4932..849ec08203b 100644 --- a/vnext/Shared/DevSupportManager.h +++ b/vnext/Shared/DevSupportManager.h @@ -10,7 +10,6 @@ #include #include #include -#include #include #include From bc0863a834ee3af46a226f464f4f816afe950ad0 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 20 May 2026 18:49:17 -0700 Subject: [PATCH 07/11] clang format --- vnext/Shared/DevSupportManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnext/Shared/DevSupportManager.cpp b/vnext/Shared/DevSupportManager.cpp index 88e27049e57..698fbf5d8e4 100644 --- a/vnext/Shared/DevSupportManager.cpp +++ b/vnext/Shared/DevSupportManager.cpp @@ -62,8 +62,8 @@ winrt::Windows::Foundation::IAsyncAction GetJavaScriptFromServerAsync( try { winrt::Windows::Web::Http::HttpResponseMessage response = co_await asyncRequest; } catch (winrt::hresult_error const &e) { - result = std::make_pair( - Microsoft::Common::Unicode::Utf16ToUtf8(e.message().c_str(), e.message().size()).c_str(), false); + result = + std::make_pair(Microsoft::Common::Unicode::Utf16ToUtf8(e.message().c_str(), e.message().size()).c_str(), false); co_return; } #else From 3fa3412c2266b7ffa9b4de43fd73ade9c93d7da5 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 20 May 2026 18:49:38 -0700 Subject: [PATCH 08/11] Change files --- ...ative-windows-2a20c629-48b2-458d-80e6-26b5546c04e0.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/react-native-windows-2a20c629-48b2-458d-80e6-26b5546c04e0.json diff --git a/change/react-native-windows-2a20c629-48b2-458d-80e6-26b5546c04e0.json b/change/react-native-windows-2a20c629-48b2-458d-80e6-26b5546c04e0.json new file mode 100644 index 00000000000..74bc56dcc93 --- /dev/null +++ b/change/react-native-windows-2a20c629-48b2-458d-80e6-26b5546c04e0.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Upgrade to Visual Studio 2026", + "packageName": "react-native-windows", + "email": "julio.rocha@microsoft.com", + "dependentChangeType": "patch" +} From 34c4be49ff085c943ee000e0694022395b8cd1fb Mon Sep 17 00:00:00 2001 From: Julio Cesar Rocha Date: Thu, 21 May 2026 00:30:48 -0700 Subject: [PATCH 09/11] Drop Windows10SDK.19041 --- .../cli/src/commands/healthCheck/healthCheckList.ts | 4 ++-- vnext/Scripts/rnw-dependencies.ps1 | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/@react-native-windows/cli/src/commands/healthCheck/healthCheckList.ts b/packages/@react-native-windows/cli/src/commands/healthCheck/healthCheckList.ts index 6e34f37cfe2..c4451f5019b 100644 --- a/packages/@react-native-windows/cli/src/commands/healthCheck/healthCheckList.ts +++ b/packages/@react-native-windows/cli/src/commands/healthCheck/healthCheckList.ts @@ -11,8 +11,8 @@ export const HealthCheckList = [ [true, 'WindowsVersion', 'Windows version >= 10.0.17763.0'], [true, 'DeveloperMode', 'Developer mode is on'], [true, 'LongPath', 'Long path support is enabled'], - [true, 'VSUWP', 'Visual Studio 2022 (>= 17.11.0) & req. components'], + [true, 'VSUWP', 'Visual Studio 2026 (>= 18.6.1) & req. components'], [true, 'Node', 'Node.js (LTS, >= 22.0)'], [true, 'Yarn', 'Yarn'], - [true, 'DotNetCore', '.NET SDK (LTS, = 8.0)'], + [true, 'DotNetCore', '.NET SDK (LTS, = 10.0)'], ]; diff --git a/vnext/Scripts/rnw-dependencies.ps1 b/vnext/Scripts/rnw-dependencies.ps1 index 3bc5d32d657..6ec18cf8140 100644 --- a/vnext/Scripts/rnw-dependencies.ps1 +++ b/vnext/Scripts/rnw-dependencies.ps1 @@ -94,7 +94,6 @@ $vsComponents = @('Microsoft.Component.MSBuild', $vcToolsComponent, 'Microsoft.VisualStudio.ComponentGroup.UWP.Support', 'Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core', - 'Microsoft.VisualStudio.Component.Windows10SDK.19041', 'Microsoft.VisualStudio.Component.Windows11SDK.22621'); # UWP.VC is not needed to build the projects with msbuild, but the VS IDE requires it. From 01b54cfce34749a35227f5fad4ac2e2d871200d4 Mon Sep 17 00:00:00 2001 From: Julio Cesar Rocha Date: Thu, 21 May 2026 00:40:21 -0700 Subject: [PATCH 10/11] Change files --- ...e-windows-cli-543cf36f-0ce7-4df7-a391-285985d3f62c.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@react-native-windows-cli-543cf36f-0ce7-4df7-a391-285985d3f62c.json diff --git a/change/@react-native-windows-cli-543cf36f-0ce7-4df7-a391-285985d3f62c.json b/change/@react-native-windows-cli-543cf36f-0ce7-4df7-a391-285985d3f62c.json new file mode 100644 index 00000000000..0552570c866 --- /dev/null +++ b/change/@react-native-windows-cli-543cf36f-0ce7-4df7-a391-285985d3f62c.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Upgrade to Visual Studio 2026", + "packageName": "@react-native-windows/cli", + "email": "julio.rocha@microsoft.com", + "dependentChangeType": "patch" +} From 22a4791e8494b6fcf89ba077376c044eedc2659d Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Thu, 21 May 2026 21:47:31 -0700 Subject: [PATCH 11/11] Set TargetFramework to net10.0-windows10.0.26100.0 --- .../Microsoft.ReactNative.CsWinRT.csproj | 6 +++--- .../packages.lock.json | 10 ++++++++-- ...osoft.ReactNative.IntegrationTests.vcxproj | 2 +- .../AnalysisTestBase.cs | 4 ++-- ...actNative.Managed.CodeGen.UnitTests.csproj | 4 ++-- ...crosoft.ReactNative.Managed.CodeGen.csproj | 20 +++++++++---------- .../PublishProfiles/DeployAsTool-Debug.pubxml | 2 +- .../DeployAsTool-Release.pubxml | 2 +- ...eactNative.Managed.IntegrationTests.csproj | 2 +- ...osoft.ReactNative.Managed.UnitTests.csproj | 2 +- .../Microsoft.ReactNative.Managed.csproj | 2 +- vnext/Mso.UnitTests/Mso.UnitTests.vcxproj | 2 +- ...osoft.ReactNative.WindowsSdk.Default.props | 8 ++++---- vnext/Scripts/Microsoft.ReactNative.nuspec | 8 ++++---- vnext/Scripts/rnw-dependencies.ps1 | 2 +- .../Microsoft.ReactNative.Test.Website.csproj | 2 +- vnext/TestWebSite/packages.lock.json | 4 ++-- vnext/template/cpp-lib/proj/MyLib.vcxproj | 2 +- vnext/template/cs-lib/proj/MyLib.csproj | 2 +- 19 files changed, 46 insertions(+), 40 deletions(-) diff --git a/vnext/Microsoft.ReactNative.CsWinRT/Microsoft.ReactNative.CsWinRT.csproj b/vnext/Microsoft.ReactNative.CsWinRT/Microsoft.ReactNative.CsWinRT.csproj index aa115969f9b..f97d920a196 100644 --- a/vnext/Microsoft.ReactNative.CsWinRT/Microsoft.ReactNative.CsWinRT.csproj +++ b/vnext/Microsoft.ReactNative.CsWinRT/Microsoft.ReactNative.CsWinRT.csproj @@ -2,8 +2,8 @@ - net6.0-windows10.0.22621.0 - 10.0.22621.0 + net10.0-windows10.0.26100.0 + 10.0.26100.0 10.0.18362.0 x86;x64;arm64 @@ -32,7 +32,7 @@ - 10.0.22621.38 + 10.0.26100.84 Microsoft.ReactNative; diff --git a/vnext/Microsoft.ReactNative.CsWinRT/packages.lock.json b/vnext/Microsoft.ReactNative.CsWinRT/packages.lock.json index b62023aab3f..b51955ad57a 100644 --- a/vnext/Microsoft.ReactNative.CsWinRT/packages.lock.json +++ b/vnext/Microsoft.ReactNative.CsWinRT/packages.lock.json @@ -1,7 +1,7 @@ { "version": 1, "dependencies": { - "net6.0-windows10.0.22621": { + "net10.0-windows10.0.26100": { "Microsoft.Windows.CsWinRT": { "type": "Direct", "requested": "[2.2.0, )", @@ -118,7 +118,8 @@ "contentHash": "l7ZptLbvOWHEJgxZtCQhUzDNCakNcqSJyAa7DNXBLKxGIUMDqq9LnWyYRZZFNQwN7hRfDAR8fEAblP1UHYHGgw==", "dependencies": { "Microsoft.WindowsAppSDK.Base": "1.8.251216001", - "Microsoft.WindowsAppSDK.Foundation": "1.8.260126001" + "Microsoft.WindowsAppSDK.Foundation": "1.8.260126001", + "System.Numerics.Tensors": "9.0.0" } }, "Microsoft.WindowsAppSDK.Runtime": { @@ -148,6 +149,11 @@ "Microsoft.WindowsAppSDK.InteractiveExperiences": "1.8.260125001" } }, + "System.Numerics.Tensors": { + "type": "Transitive", + "resolved": "9.0.0", + "contentHash": "hyJB4UlpAi19Xr9AXzu2NuagKC4lPfHObNMEAA0HmqFz2rX7wKgzeYzO/jM/eBHDhnUGFFEjk5cOoJaxqg5J4A==" + }, "common": { "type": "Project", "dependencies": { diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj index 81b39fcd7e9..2181f21e0a2 100644 --- a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj +++ b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj @@ -17,7 +17,7 @@ false Windows Store 10.0 - 10.0.22621.0 + 10.0.26100.0 true None diff --git a/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/AnalysisTestBase.cs b/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/AnalysisTestBase.cs index d56ca634bb7..6d75c17ad49 100644 --- a/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/AnalysisTestBase.cs +++ b/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/AnalysisTestBase.cs @@ -90,8 +90,8 @@ public class TestClass // of the unitest runners are allowed to pick up a variable from the build file. And given the many // ways one can run inttests, this seemed to be the most reasonable out of a lot of poor options. var win10SdkFolder = @"C:\Program Files (x86)\Windows Kits\10"; -#if win10SdkVersion10_0_22621_0 - var win10SdkVersion = "10.0.22621.0"; +#if win10SdkVersion10_0_26100_0 + var win10SdkVersion = "10.0.26100.0"; #else #error The Win10 Sdk Version must be updated in code when updated in MSBuild. #endif diff --git a/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj b/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj index 8d5b5fa22a1..03592bdb121 100644 --- a/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj +++ b/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 x64 win-x64 false @@ -35,7 +35,7 @@ - 10.0.22621.0 + 10.0.26100.0 $(WindowsTargetPlatformVersion.Replace('.', '_')) $(p:DefineConstants);win10SdkVersion$(WindowsTargetPlatformVersionEncoded) diff --git a/vnext/Microsoft.ReactNative.Managed.CodeGen/Microsoft.ReactNative.Managed.CodeGen.csproj b/vnext/Microsoft.ReactNative.Managed.CodeGen/Microsoft.ReactNative.Managed.CodeGen.csproj index 6b18c3aeecb..bccc8d80bdf 100644 --- a/vnext/Microsoft.ReactNative.Managed.CodeGen/Microsoft.ReactNative.Managed.CodeGen.csproj +++ b/vnext/Microsoft.ReactNative.Managed.CodeGen/Microsoft.ReactNative.Managed.CodeGen.csproj @@ -3,7 +3,7 @@ Exe - net8.0 + net10.0 x64;x86;ARM64 win-x86;win-x64 @@ -31,8 +31,8 @@ - @@ -53,7 +53,7 @@ - @@ -62,13 +62,13 @@ - - diff --git a/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml b/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml index c6c28996632..910d6f9f7d6 100644 --- a/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml +++ b/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml @@ -6,7 +6,7 @@ FileSystem Debug x64 - net8.0 + net10.0 $(OutDir)publish win-x64 true diff --git a/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml b/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml index 373853ddc0e..9973e782006 100644 --- a/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml +++ b/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml @@ -6,7 +6,7 @@ FileSystem Release x64 - net8.0 + net10.0 $(OutDir)publish win-x64 true diff --git a/vnext/Microsoft.ReactNative.Managed.IntegrationTests/Microsoft.ReactNative.Managed.IntegrationTests.csproj b/vnext/Microsoft.ReactNative.Managed.IntegrationTests/Microsoft.ReactNative.Managed.IntegrationTests.csproj index 920192baf7e..d9770ec5081 100644 --- a/vnext/Microsoft.ReactNative.Managed.IntegrationTests/Microsoft.ReactNative.Managed.IntegrationTests.csproj +++ b/vnext/Microsoft.ReactNative.Managed.IntegrationTests/Microsoft.ReactNative.Managed.IntegrationTests.csproj @@ -12,7 +12,7 @@ en-US false UAP - 10.0.22621.0 + 10.0.26100.0 10.0.17763.0 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} diff --git a/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj b/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj index b38fefb8ca2..e1972655e26 100644 --- a/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj +++ b/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj @@ -12,7 +12,7 @@ en-US false UAP - 10.0.22621.0 + 10.0.26100.0 10.0.17763.0 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} diff --git a/vnext/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj b/vnext/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj index 2219b23fddf..89f9644cb62 100644 --- a/vnext/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +++ b/vnext/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj @@ -13,7 +13,7 @@ en-US false UAP - 10.0.22621.0 + 10.0.26100.0 10.0.17763.0 17.0 512 diff --git a/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj b/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj index 1609c75d257..f442045d415 100644 --- a/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj +++ b/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj @@ -19,7 +19,7 @@ false Windows Store 10.0 - 10.0.22621.0 + 10.0.26100.0 true None diff --git a/vnext/PropertySheets/External/Microsoft.ReactNative.WindowsSdk.Default.props b/vnext/PropertySheets/External/Microsoft.ReactNative.WindowsSdk.Default.props index 267f68371e2..45ffa281cd0 100644 --- a/vnext/PropertySheets/External/Microsoft.ReactNative.WindowsSdk.Default.props +++ b/vnext/PropertySheets/External/Microsoft.ReactNative.WindowsSdk.Default.props @@ -17,20 +17,20 @@ - 10.0.22621.0 + 10.0.26100.0 10.0.17763.0 - 10.0.22621.0 + 10.0.26100.0 10.0.18362.0 - 10.0.22621.0 + 10.0.26100.0 10.0.17763.0 - 10.0.22621.0 + 10.0.26100.0 10.0.18362.0 diff --git a/vnext/Scripts/Microsoft.ReactNative.nuspec b/vnext/Scripts/Microsoft.ReactNative.nuspec index 0c6e12d960d..3fbe9d6b0a2 100644 --- a/vnext/Scripts/Microsoft.ReactNative.nuspec +++ b/vnext/Scripts/Microsoft.ReactNative.nuspec @@ -21,12 +21,12 @@ - + - diff --git a/vnext/Scripts/rnw-dependencies.ps1 b/vnext/Scripts/rnw-dependencies.ps1 index 6ec18cf8140..d18601b9e25 100644 --- a/vnext/Scripts/rnw-dependencies.ps1 +++ b/vnext/Scripts/rnw-dependencies.ps1 @@ -94,7 +94,7 @@ $vsComponents = @('Microsoft.Component.MSBuild', $vcToolsComponent, 'Microsoft.VisualStudio.ComponentGroup.UWP.Support', 'Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core', - 'Microsoft.VisualStudio.Component.Windows11SDK.22621'); + 'Microsoft.VisualStudio.Component.Windows11SDK.26100'); # UWP.VC is not needed to build the projects with msbuild, but the VS IDE requires it. if (!($tagsToInclude.Contains('buildLab'))) { diff --git a/vnext/TestWebSite/Microsoft.ReactNative.Test.Website.csproj b/vnext/TestWebSite/Microsoft.ReactNative.Test.Website.csproj index 7d08141d444..0987f9be3a6 100644 --- a/vnext/TestWebSite/Microsoft.ReactNative.Test.Website.csproj +++ b/vnext/TestWebSite/Microsoft.ReactNative.Test.Website.csproj @@ -3,7 +3,7 @@ AnyCPU AnyCPU - net8.0 + net10.0 enable enable $(IntDir)$(TargetFramework)\ diff --git a/vnext/TestWebSite/packages.lock.json b/vnext/TestWebSite/packages.lock.json index 807ab822b67..b4f8a026004 100644 --- a/vnext/TestWebSite/packages.lock.json +++ b/vnext/TestWebSite/packages.lock.json @@ -1,6 +1,6 @@ { "version": 1, "dependencies": { - "net8.0": {} + "net10": {} } -} \ No newline at end of file +} diff --git a/vnext/template/cpp-lib/proj/MyLib.vcxproj b/vnext/template/cpp-lib/proj/MyLib.vcxproj index c2ce9c7ff31..b2e0eaf3ec0 100644 --- a/vnext/template/cpp-lib/proj/MyLib.vcxproj +++ b/vnext/template/cpp-lib/proj/MyLib.vcxproj @@ -21,7 +21,7 @@ - 10.0.22621.0 + 10.0.26100.0 10.0.17763.0 diff --git a/vnext/template/cs-lib/proj/MyLib.csproj b/vnext/template/cs-lib/proj/MyLib.csproj index bb7a2ed11cf..21d20d87bea 100644 --- a/vnext/template/cs-lib/proj/MyLib.csproj +++ b/vnext/template/cs-lib/proj/MyLib.csproj @@ -24,7 +24,7 @@ - 10.0.22621.0 + 10.0.26100.0 10.0.17763.0