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"
+}
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"
+}
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/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
@@ -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.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj b/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj
index fb527c87e9c..63f176b1173 100644
--- a/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj
+++ b/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj
@@ -67,7 +67,8 @@
_CONSOLE;MSO_MOTIFCPP;%(PreprocessorDefinitions)
Level4
$(MSBuildThisFileDirectory);%(AdditionalIncludeDirectories)
- /await %(AdditionalOptions) /bigobj
+ %(AdditionalOptions) /bigobj
+ %(AdditionalOptions) /await
true
Cdecl
diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj
index 5f747599497..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
@@ -88,7 +88,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/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/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/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/Mso.UnitTests/Mso.UnitTests.vcxproj b/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj
index 74fb6cc93fa..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
@@ -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/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/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/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 a57d7809f5c..d18601b9e25 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
)
@@ -94,8 +94,7 @@ $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');
+ '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'))) {
@@ -113,12 +112,12 @@ $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.1";
# 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) {
@@ -242,9 +241,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 +457,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;
@@ -491,7 +490,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 +498,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 +599,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 +692,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 +736,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
+}
diff --git a/vnext/Shared/DevSupportManager.cpp b/vnext/Shared/DevSupportManager.cpp
index b485fc1b304..698fbf5d8e4 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(
- 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
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
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;
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