Upgrade to Windows SDK 10.0.22621.0 (#13287)

## Description
Bumps and aligns the SDK version from `10.0.19041.0` to `10.0.22621.0`.

### Type of Change
- Bug fix (non-breaking change which fixes an issue)

### Why
- There is a requirement to build the Desktop DLL (`react-native-win32.dll`) for ARM64EC.\
  This makes Windows SDK 10.0.22621.0 necessary due to the dependency on intrinsics-related headers not available in version 10.0.19041.0.
- There is the added benefit of using the default SDK version installed by Visual Studio 2022, reducing the number of development dependencies.

Replaces #10869

### What
- Bumps all Win SDK references to version 22621.
- Adds installation of version 22621 in both installation scripts and CI.
This commit is contained in:
Julio César Rocha 2024-06-04 09:43:32 -07:00 коммит произвёл GitHub
Родитель 37a418064e
Коммит 25be51926c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
32 изменённых файлов: 79 добавлений и 62 удалений

Просмотреть файл

@ -1,5 +1,5 @@
{
"imageType": "Managed",
"imageType": "Managed",
"baseImage": "/MicrosoftWindowsServer/WindowsServer/2022-datacenter/latest",
"artifacts": [
{
@ -63,4 +63,4 @@
}
}
]
}
}

Просмотреть файл

@ -71,4 +71,4 @@
}
]
}
}
}

3
.github/ISSUE_TEMPLATE/bug-report.yaml поставляемый
Просмотреть файл

@ -58,6 +58,7 @@ body:
- "10.0.19041"
- "10.0.22000"
- "10.0.22321"
- "10.0.22621"
id: sdk
- type: dropdown
attributes:
@ -102,4 +103,4 @@ body:
You may provide a screenshot of the application if you think it is relevant to your bug report.
[Here are some tips for providing a minimal example](https://stackoverflow.com/help/mcve).
id: code

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Upgrade to Windows SDK 10.0.22621.0",
"packageName": "@react-native-windows/cli",
"email": "julio.rocha@microsoft.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Upgrade to Windows SDK 10.0.22621.0",
"packageName": "@react-native-windows/telemetry",
"email": "julio.rocha@microsoft.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Upgrade to Windows SDK 10.0.22621.0",
"packageName": "react-native-windows",
"email": "julio.rocha@microsoft.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -28,12 +28,12 @@ export async function buildSolution(
buildLogDirectory?: string,
singleproc?: boolean,
) {
const minVersion = new Version(10, 0, 19041, 0);
const minVersion = new Version(10, 0, 22621, 0);
const allVersions = MSBuildTools.getAllAvailableUAPVersions();
if (!allVersions.some(v => v.gte(minVersion))) {
throw new CodedError(
'MinSDKVersionNotMet',
'Must have a minimum Windows SDK version 10.0.19041.0 installed',
'Must have a minimum Windows SDK version 10.0.22621.0 installed',
);
}

Просмотреть файл

@ -196,7 +196,7 @@ test('sanitizeErrorMessage() with cpu/thread id', () => {
test('sanitizeErrorMessage() with standard MSBuild error', () => {
expect(
errorUtils.sanitizeErrorMessage(
`2:6>C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.19041.0\\XamlCompiler\\Microsoft.Windows.UI.Xaml.Common.targets(486,5): error MSB4181: The "CompileXaml" task returned false but did not log an error. [${process.cwd()}\\windows\\teltest68\\teltest68.csproj]`,
`2:6>C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.22621.0\\XamlCompiler\\Microsoft.Windows.UI.Xaml.Common.targets(486,5): error MSB4181: The "CompileXaml" task returned false but did not log an error. [${process.cwd()}\\windows\\teltest68\\teltest68.csproj]`,
),
).toEqual(
`[path](486,5): error MSB4181: The CompileXaml task returned false but did not log an error. [windows]\\???.csproj(${

Просмотреть файл

@ -15,7 +15,7 @@
<AssemblyName>UsesPackageReference</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.22621.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>17.0</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>

Просмотреть файл

@ -14,7 +14,7 @@
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.19041.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.22621.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
<PackageCertificateKeyFile>UsesPackagesConfig_TemporaryKey.pfx</PackageCertificateKeyFile>
<PackageCertificateThumbprint>BD020D42719A4B73450B23C7D86BA5915757AE6E</PackageCertificateThumbprint>

Просмотреть файл

@ -24,7 +24,7 @@
</PropertyGroup>
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props')" />
<PropertyGroup Label="Fallback Windows SDK Versions">
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.22621.0</TargetPlatformVersion>
<TargetPlatformMinVersion Condition=" '$(TargetPlatformMinVersion)' == '' ">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">

Просмотреть файл

@ -19,7 +19,7 @@
</PropertyGroup>
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props')" />
<PropertyGroup Label="Fallback Windows SDK Versions">
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.22621.0</TargetPlatformVersion>
<TargetPlatformMinVersion Condition=" '$(TargetPlatformMinVersion)' == '' ">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

Просмотреть файл

@ -8,7 +8,7 @@
<Keyword>Win32Proj</Keyword>
<!-- <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier> -->
<WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.22621.0</WindowsTargetPlatformVersion>
<BuildMSRNCxx>false</BuildMSRNCxx>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>17.0</MinimumVisualStudioVersion>

Просмотреть файл

@ -19,7 +19,7 @@
</PropertyGroup>
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props')" />
<PropertyGroup Label="Fallback Windows SDK Versions">
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.19041.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.22621.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion Condition=" '$(WindowsTargetPlatformMinVersion)' == '' ">10.0.17763.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

Просмотреть файл

@ -24,7 +24,7 @@
</PropertyGroup>
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props')" />
<PropertyGroup Label="Fallback Windows SDK Versions">
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.22621.0</TargetPlatformVersion>
<TargetPlatformMinVersion Condition=" '$(TargetPlatformMinVersion)' == '' ">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">

Просмотреть файл

@ -236,7 +236,7 @@ TEST_CLASS(HttpOriginPolicyIntegrationTest)
BEGIN_TEST_METHOD_ATTRIBUTE(NoCorsForbiddenMethodSucceeds)
// CONNECT, TRACE, and TRACK methods not supported by Windows.Web.Http
// https://docs.microsoft.com/en-us/uwp/api/windows.web.http.httpmethod?view=winrt-19041#properties
// https://docs.microsoft.com/en-us/uwp/api/windows.web.http.httpmethod?view=winrt-22621#properties
TEST_IGNORE()
END_TEST_METHOD_ATTRIBUTE()
TEST_METHOD(NoCorsForbiddenMethodSucceeds)

Просмотреть файл

@ -15,7 +15,7 @@
<AppContainerApplication>false</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<WindowsTargetPlatformVersion>10.0.22000.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.22621.0</WindowsTargetPlatformVersion>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<WindowsPackageType>None</WindowsPackageType>
</PropertyGroup>

Просмотреть файл

@ -33,8 +33,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
"resolved": "0.1.18",
"contentHash": "5K8rRihGwIs2XNOTP2Jsw3T6cegxCBQXcpPS4optONU/AmFElGAfnA6XBQJ4UqlCFCl9Nf9zQrgvCUPBWYHiag=="
"resolved": "0.1.21",
"contentHash": "5njCh+3eXTLOv7+8nOnp6nJ5C0r6it5ze54c0nuWleeDptuK8t3dEDB79XTU4D5DKNvAPlqJpgXRDOak5nYIug=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@ -84,7 +84,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
"Microsoft.JavaScript.Hermes": "[0.1.18, )",
"Microsoft.JavaScript.Hermes": "[0.1.21, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",

Просмотреть файл

@ -90,17 +90,17 @@ 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_19041_0
var win10SdkVersion = "10.0.19041.0";
#if win10SdkVersion10_0_22621_0
var win10SdkVersion = "10.0.22621.0";
#else
#error The Win10 Sdk Version must be updated in code when updated in MSBuild.
#endif
references.AddRange(new[] {
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.AI.MachineLearning.MachineLearningContract\3.0.0.0\Windows.AI.MachineLearning.MachineLearningContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.AI.MachineLearning.MachineLearningContract\5.0.0.0\Windows.AI.MachineLearning.MachineLearningContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract\2.0.0.0\Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.ApplicationModel.Calls.Background.CallsBackgroundContract\2.0.0.0\Windows.ApplicationModel.Calls.Background.CallsBackgroundContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.ApplicationModel.Calls.CallsPhoneContract\5.0.0.0\Windows.ApplicationModel.Calls.CallsPhoneContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.ApplicationModel.Calls.Background.CallsBackgroundContract\4.0.0.0\Windows.ApplicationModel.Calls.Background.CallsBackgroundContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.ApplicationModel.Calls.CallsPhoneContract\7.0.0.0\Windows.ApplicationModel.Calls.CallsPhoneContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.ApplicationModel.Calls.CallsVoipContract\4.0.0.0\Windows.ApplicationModel.Calls.CallsVoipContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract\2.0.0.0\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.ApplicationModel.SocialInfo.SocialInfoContract\2.0.0.0\Windows.ApplicationModel.SocialInfo.SocialInfoContract.winmd",
@ -111,7 +111,7 @@ public class TestClass
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.Devices.SmartCards.SmartCardBackgroundTriggerContract\3.0.0.0\Windows.Devices.SmartCards.SmartCardBackgroundTriggerContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.Devices.SmartCards.SmartCardEmulatorContract\6.0.0.0\Windows.Devices.SmartCards.SmartCardEmulatorContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.Foundation.FoundationContract\4.0.0.0\Windows.Foundation.FoundationContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.Foundation.UniversalApiContract\10.0.0.0\Windows.Foundation.UniversalApiContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.Foundation.UniversalApiContract\15.0.0.0\Windows.Foundation.UniversalApiContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.Gaming.XboxLive.StorageApiContract\1.0.0.0\Windows.Gaming.XboxLive.StorageApiContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.Graphics.Printing3D.Printing3DContract\4.0.0.0\Windows.Graphics.Printing3D.Printing3DContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.Networking.Connectivity.WwanContract\2.0.0.0\Windows.Networking.Connectivity.WwanContract.winmd",
@ -125,7 +125,7 @@ public class TestClass
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.System.Profile.SystemManufacturers.SystemManufacturersContract\3.0.0.0\Windows.System.Profile.SystemManufacturers.SystemManufacturersContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.System.SystemManagementContract\7.0.0.0\Windows.System.SystemManagementContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.UI.ViewManagement.ViewManagementViewScalingContract\1.0.0.0\Windows.UI.ViewManagement.ViewManagementViewScalingContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.UI.Xaml.Core.Direct.XamlDirectContract\2.0.0.0\Windows.UI.Xaml.Core.Direct.XamlDirectContract.winmd",
$@"{win10SdkFolder}\References\{win10SdkVersion}\Windows.UI.Xaml.Core.Direct.XamlDirectContract\5.0.0.0\Windows.UI.Xaml.Core.Direct.XamlDirectContract.winmd",
$@"{win10SdkFolder}\UnionMetadata\{win10SdkVersion}\Facade\Windows.winmd"
});

Просмотреть файл

@ -35,7 +35,7 @@
<!-- Ensure the Win10 SDK binaries loaded by the unittest match our apps SDK versions -->
<PropertyGroup>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.22621.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersionEncoded>$(WindowsTargetPlatformVersion.Replace('.', '_'))</WindowsTargetPlatformVersionEncoded>
<DefineConstants>$(p:DefineConstants);win10SdkVersion$(WindowsTargetPlatformVersionEncoded)</DefineConstants>
</PropertyGroup>
@ -77,4 +77,3 @@
</Target>
</Project>

Просмотреть файл

@ -12,7 +12,7 @@
<DefaultLanguage>en-US</DefaultLanguage>
<GenerateProjectSpecificOutputFolder>false</GenerateProjectSpecificOutputFolder>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformVersion>10.0.22621.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
@ -152,7 +152,7 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>

Просмотреть файл

@ -12,7 +12,7 @@
<DefaultLanguage>en-US</DefaultLanguage>
<GenerateProjectSpecificOutputFolder>false</GenerateProjectSpecificOutputFolder>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformVersion>10.0.22621.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

Просмотреть файл

@ -13,7 +13,7 @@
<DefaultLanguage>en-US</DefaultLanguage>
<GenerateProjectSpecificOutputFolder>false</GenerateProjectSpecificOutputFolder>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.22621.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>17.0</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>

Просмотреть файл

@ -147,7 +147,7 @@ void BatchingEventEmitter::OnFrameUI() noexcept {
});
// Don't leave the callback continuously registered as it can waste power.
// See https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.compositiontarget.rendering?view=winrt-19041
// See https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.compositiontarget.rendering?view=winrt-22621
m_renderingRevoker.revoke();
}

Просмотреть файл

@ -445,14 +445,14 @@ void DynamicAutomationPeer::SetValue(double value) {
// Doesn't have a React Native analog.
// Return default value for XAML Slider.
// https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.primitives.rangebase.smallchange?view=winrt-19041
// https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.primitives.rangebase.smallchange?view=winrt-22621
double DynamicAutomationPeer::SmallChange() {
return 1;
}
// Doesn't have a React Native analog.
// Return default value for XAML Slider.
// https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.primitives.rangebase.largechange?view=winrt-19041
// https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.primitives.rangebase.largechange?view=winrt-22621
double DynamicAutomationPeer::LargeChange() {
return 10;
}

Просмотреть файл

@ -17,7 +17,7 @@
<AppContainerApplication>false</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<WindowsTargetPlatformVersion>10.0.22000.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.22621.0</WindowsTargetPlatformVersion>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<WindowsPackageType>None</WindowsPackageType>
</PropertyGroup>

Просмотреть файл

@ -12,20 +12,20 @@
See https://microsoft.github.io/react-native-windows/docs/win10-compat
-->
<PropertyGroup Label="Globals" Condition="'$(MSBuildProjectExtension)' == '.vcxproj'">
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)'=='' Or '$(WindowsTargetPlatformVersion)'=='10.0.0.0'">10.0.19041.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)'=='' Or '$(WindowsTargetPlatformVersion)'=='10.0.0.0'">10.0.22621.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion Condition="'$(WindowsTargetPlatformMinVersion)'=='' Or '$(WindowsTargetPlatformMinVersion)'=='10.0.0.0'">10.0.17763.0</WindowsTargetPlatformMinVersion>
<!-- WinAppSDK/Composition projects have higher version requirements. -->
<WindowsTargetPlatformVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(WindowsTargetPlatformVersion)', '10.0.22000.0'))">10.0.22000.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(WindowsTargetPlatformVersion)', '10.0.22621.0'))">10.0.22621.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(WindowsTargetPlatformMinVersion)', '10.0.18362.0'))">10.0.18362.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Label="Globals" Condition="'$(MSBuildProjectExtension)' == '.csproj' Or '$(MSBuildProjectExtension)' == '.wapproj'">
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)'==''">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)'==''">10.0.22621.0</TargetPlatformVersion>
<TargetPlatformMinVersion Condition="'$(TargetPlatformMinVersion)'==''">10.0.17763.0</TargetPlatformMinVersion>
<!-- WinAppSDK/Composition projects have higher version requirements. -->
<TargetPlatformVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(TargetPlatformVersion)', '10.0.22000.0'))">10.0.22000.0</TargetPlatformVersion>
<TargetPlatformVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(TargetPlatformVersion)', '10.0.22621.0'))">10.0.22621.0</TargetPlatformVersion>
<TargetPlatformMinVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(TargetPlatformMinVersion)', '10.0.17763.0'))">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>

Просмотреть файл

@ -65,18 +65,14 @@ $vsComponents = @('Microsoft.Component.MSBuild',
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
'Microsoft.VisualStudio.ComponentGroup.UWP.Support',
'Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core',
'Microsoft.VisualStudio.Component.Windows10SDK.19041');
'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.
if (!($tagsToInclude.Contains('buildLab'))) {
$vsComponents += 'Microsoft.VisualStudio.ComponentGroup.UWP.VC';
}
# Windows11SDK is only needed for the more experimental composition projects using newer WinAppSDK versions
if ($tagsToInclude.Contains('rnwDev')) {
$vsComponents += 'Microsoft.VisualStudio.Component.Windows11SDK.22000';
}
$vsWorkloads = @('Microsoft.VisualStudio.Workload.ManagedDesktop',
'Microsoft.VisualStudio.Workload.NativeDesktop',
'Microsoft.VisualStudio.Workload.Universal');
@ -127,7 +123,7 @@ function Get-VSPathPropertyForEachInstall {
[String[]]$paths = ($output | Where-Object { (Test-Path $_) });
return $paths;
}
return $null;
}
@ -187,26 +183,26 @@ function GetVSChannelAndProduct {
param(
[string]$VsWhere
)
if ($VsWhere) {
$channelId = & $VsWhere -version $vsver -property channelId;
$productId = & $VsWhere -version $vsver -property productId;
# Channel/product not found, check one more time for pre-release
if (($channelId -eq $null) -or ($productId -eq $null)) {
$channelId = & $VsWhere -version $vsver -property channelId -prerelease;
$productId = & $VsWhere -version $vsver -property productId -prerelease;
}
return $channelId, $productId;
}
return $null, $null;
}
function InstallVS {
$vsWhere = Get-VSWhere;
$channelId, $productId = GetVSChannelAndProduct -VsWhere $vsWhere
if (($vsWhere -eq $null) -or ($channelId -eq $null) -or ($productId -eq $null)) {
@ -223,7 +219,7 @@ function InstallVS {
$channelId, $productId = GetVSChannelAndProduct -VsWhere $vsWhere
}
# Final check before attempting install
if (($vsWhere -eq $null) -or ($channelId -eq $null) -or ($productId -eq $null)) {
throw "Unable to find or install a compatible version of Visual Studio >= ($vsver).";
@ -332,7 +328,7 @@ function InstallCppWinRT_VSIX {
$url = "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/CppWinRTTeam/vsextensions/cppwinrt101804264/2.0.210304.5/vspackage";
Write-Verbose "Downloading CppWinRT VSIX from $url";
Invoke-WebRequest -UseBasicParsing $url -OutFile $env:TEMP\Microsoft.Windows.CppWinRT.vsix;
$vsWhere = Get-VSWhere;
if ($vsWhere -eq $null) {
return;
@ -547,7 +543,7 @@ function WinGetInstall {
& winget install "$wingetPackage" --accept-source-agreements --accept-package-agreements
}
}
function IsElevated {
return [bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match "S-1-5-32-544");
}
@ -669,4 +665,4 @@ if ($NeedsRerun -ne 0) {
$Tags | Out-File $MarkerFile;
if (!$ShellInvocation) { Read-Host 'Press Enter to exit' }
exit 0;
}
}

Просмотреть файл

@ -310,7 +310,7 @@ void WinRTWebSocketResource::Connect(string &&url, const Protocols &protocols, c
if (FAILED(hr)) {
// See
// https://docs.microsoft.com/uwp/api/windows.networking.sockets.messagewebsocketmessagereceivedeventargs.getdatareader?view=winrt-19041#remarks
// https://docs.microsoft.com/uwp/api/windows.networking.sockets.messagewebsocketmessagereceivedeventargs.getdatareader?view=winrt-22621#remarks
if (hr == WININET_E_CONNECTION_ABORTED) {
string errorMessage{"[0x80072EFE] Underlying TCP connection suddenly terminated"};
self->m_errorHandler({errorMessage, ErrorType::Connection});

Просмотреть файл

@ -32,7 +32,7 @@ The minimum dimension setting is required to ensure that the ScrollContentView p
When using inverted VirtualizedList, as new items are added to the "top" of the list (i.e., inserted at position 0), when at the bottom edge, the view port appears to anchor such that the newly inserted item appears to scroll into view and layout synchronously. In reality, since the ScrollView itself is flipped, the view port is just staying at offset 0.
In XAML, there are two properties, [`HorizontalAnchorRatio`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer.horizontalanchorratio?view=winrt-19041) and [`VerticalAnchorRatio`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer.verticalanchorratio?view=winrt-19041), that implement bottom edge anchoring when given a value of 1.0 (or top edge anchoring when given a value of 0.0). Any other value controls how `IScrollAnchorProvider` chooses to anchor a specific view in the view port.
In XAML, there are two properties, [`HorizontalAnchorRatio`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer.horizontalanchorratio?view=winrt-22621) and [`VerticalAnchorRatio`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer.verticalanchorratio?view=winrt-22621), that implement bottom edge anchoring when given a value of 1.0 (or top edge anchoring when given a value of 0.0). Any other value controls how `IScrollAnchorProvider` chooses to anchor a specific view in the view port.
One caveat to the anchor ratio properties in XAML is that you need to call `ScrollViewer.InvalidateArrange` whenever the layout of its descendants change (e.g., when a new view is inserted) in order for the edge anchoring behavior to function properly.
@ -42,9 +42,9 @@ Since currently we only want to have start or end edge anchoring, or none at all
Another feature of inverted VirtualizedList is that view port will not jump when more content is loaded "above" it. Again, this is a side-effect of the ScrollView itself being inverted, so the view port offset actually remains the same, even though the perceived offset will have shifted downward.
In XAML, we can achieve this using the [`CanBeScrollAnchor`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.uielement.canbescrollanchor?view=winrt-19041) property on the list items. Under the hood, the XAML ScrollViewer implements `IScrollAnchorProvider`, and if a layout operation will result in a selected scroll anchor changing position, the view port will be synchronously scrolled to keep the scroll anchor in place. The `CanBeScrollAnchor` property simply tells the ScrollViewer which of its descendants are eligible to be scroll anchors.
In XAML, we can achieve this using the [`CanBeScrollAnchor`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.uielement.canbescrollanchor?view=winrt-22621) property on the list items. Under the hood, the XAML ScrollViewer implements `IScrollAnchorProvider`, and if a layout operation will result in a selected scroll anchor changing position, the view port will be synchronously scrolled to keep the scroll anchor in place. The `CanBeScrollAnchor` property simply tells the ScrollViewer which of its descendants are eligible to be scroll anchors.
This view anchoring behavior is actually the default behavior on many Web browsers, and [some Web browsers](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-anchor#browser_compatibility) even expose a CSS property to opt-out of scroll anchoring. Since what we are trying to achieve here has effectively the same semantics as scroll anchoring on Web browsers, we could call the prop to enable scroll anchoring `overflowAnchor` and add it to `View`. Since this is not a platform default behavior, and there is likely some performance penalty to opting in to scroll anchoring, we should add an `overflowAnchorMode` prop to `ScrollView` to switch between `explicit` (opt-in), `implicit` (opt-out), and
This view anchoring behavior is actually the default behavior on many Web browsers, and [some Web browsers](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-anchor#browser_compatibility) even expose a CSS property to opt-out of scroll anchoring. Since what we are trying to achieve here has effectively the same semantics as scroll anchoring on Web browsers, we could call the prop to enable scroll anchoring `overflowAnchor` and add it to `View`. Since this is not a platform default behavior, and there is likely some performance penalty to opting in to scroll anchoring, we should add an `overflowAnchorMode` prop to `ScrollView` to switch between `explicit` (opt-in), `implicit` (opt-out), and
You might ask, why might you even need to specify which values to opt-out of scroll anchoring? Could we not just turn on anchoring for all top-level items in the ScrollContentView and call it a day? We cannot because of VirtualizedList and sticky headers. Consider what might happen if the ScrollView chooses the VirtualizedList spacer as the anchor candidate. As content is rendered in the view port and the spacer shrinks, the view port will scroll to keep the spacer anchored, which is not expected behavior. Similarly for sticky headers, as the sticky header shifts to remain at the top of the view port, if the ScrollView selected the sticky header as the anchor, it may not appear to anchor at all as the sticky header has it's own mechanism to remain anchored to the top of the view port. Note, there is also some precedent for opting out specific views in anchoring on iOS with the `maintainVisibleContentPosition` prop. If you exclude the auto-scroll to top functionality that this iOS prop provides, you could potentially emulate, e.g., `maintainVisibleContentPosition={{minIndexForVisible: 1}}` using `enableAnchoring={true}` and setting `overflowAnchor={'none'}` on the first item in the list (or the first N items where N is the value for `minIndexForVisible`).

Просмотреть файл

@ -20,7 +20,7 @@
</PropertyGroup>
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props')" />
<PropertyGroup Label="Fallback Windows SDK Versions">
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.19041.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.22621.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion Condition=" '$(WindowsTargetPlatformMinVersion)' == '' ">10.0.17763.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

Просмотреть файл

@ -24,7 +24,7 @@
</PropertyGroup>
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props')" />
<PropertyGroup Label="Fallback Windows SDK Versions">
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.22621.0</TargetPlatformVersion>
<TargetPlatformMinVersion Condition=" '$(TargetPlatformMinVersion)' == '' ">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">