react-native-windows 0.81.26 → 0.81.28
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.
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +3 -2
- package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +2 -1
- package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +3 -0
- package/Microsoft.ReactNative/Utils/LocalBundleReader.cpp +33 -25
- package/Microsoft.ReactNative/Utils/LocalBundleReader.h +5 -3
- package/Microsoft.ReactNative/Utils/PropertyUtils.h +1 -1
- package/Microsoft.ReactNative/Utils/UwpScriptStore.cpp +2 -2
- package/Microsoft.ReactNative/Utils/UwpScriptStore.h +3 -2
- package/Microsoft.ReactNative/Views/FrameworkElementViewManager.cpp +1 -1
- package/Microsoft.ReactNative/Views/ScrollViewManager.cpp +5 -5
- package/Microsoft.ReactNative/Views/TextViewManager.cpp +1 -1
- package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +16 -0
- package/Microsoft.ReactNative.Cxx/NativeModules.h +2 -1
- package/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +3 -3
- package/Microsoft.ReactNative.Managed.CodeGen/Microsoft.ReactNative.Managed.CodeGen.csproj +8 -18
- package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml +1 -1
- package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml +1 -1
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/PropertySheets/JSEngine.props +1 -1
- package/PropertySheets/React.Cpp.props +4 -3
- package/PropertySheets/WinUI.props +2 -2
- package/Scripts/JustMyXaml.ps1 +8 -8
- package/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 +12 -18
- package/Scripts/UnitTest.ps1 +3 -1
- package/Scripts/rnw-dependencies.ps1 +27 -14
- package/Shared/DevSupportManager.cpp +55 -48
- package/Shared/DevSupportManager.h +0 -1
- package/Shared/Hermes/HermesSamplingProfiler.cpp +2 -4
- package/Shared/Modules/IWebSocketModuleContentHandler.h +15 -0
- package/Shared/Modules/WebSocketModule.cpp +8 -3
- package/Shared/Networking/DefaultBlobResource.cpp +37 -0
- package/Shared/Networking/DefaultBlobResource.h +12 -0
- package/Shared/Networking/WinRTWebSocketResource.h +5 -1
- package/codegen/rnwcoreJSI-generated.cpp +419 -419
- package/just-task.js +13 -2
- package/package.json +3 -3
- package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +1 -1
- package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +1 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<ProjectName>Microsoft.ReactNative</ProjectName>
|
|
11
11
|
<RootNamespace>Microsoft.ReactNative</RootNamespace>
|
|
12
12
|
<DefaultLanguage>en-US</DefaultLanguage>
|
|
13
|
-
<MinimumVisualStudioVersion>
|
|
13
|
+
<MinimumVisualStudioVersion>18.0</MinimumVisualStudioVersion>
|
|
14
14
|
<AppContainerApplication>true</AppContainerApplication>
|
|
15
15
|
<ApplicationType>Windows Store</ApplicationType>
|
|
16
16
|
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
|
|
@@ -96,7 +96,8 @@
|
|
|
96
96
|
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
|
|
97
97
|
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
|
|
98
98
|
<WarningLevel>Level4</WarningLevel>
|
|
99
|
-
<AdditionalOptions
|
|
99
|
+
<AdditionalOptions>%(AdditionalOptions) /bigobj /ZH:SHA_256</AdditionalOptions>
|
|
100
|
+
<AdditionalOptions Condition="$(PlatformToolsetVersion)<145">%(AdditionalOptions) /await</AdditionalOptions>
|
|
100
101
|
<AdditionalIncludeDirectories>
|
|
101
102
|
$(FmtDir)\include;
|
|
102
103
|
$(ReactNativeWindowsDir)Microsoft.ReactNative;
|
|
@@ -1108,7 +1108,8 @@ void NativeUIManager::findSubviewIn(
|
|
|
1108
1108
|
xaml::FrameworkElement foundElement = nullptr;
|
|
1109
1109
|
|
|
1110
1110
|
for (const auto &elem : hitTestElements) {
|
|
1111
|
-
if (
|
|
1111
|
+
if (const auto candidate = elem.try_as<xaml::FrameworkElement>()) {
|
|
1112
|
+
foundElement = candidate;
|
|
1112
1113
|
auto tag = GetTag(foundElement);
|
|
1113
1114
|
if (tag != InvalidTag) {
|
|
1114
1115
|
foundTag = tag;
|
|
@@ -3,6 +3,7 @@ import "ReactNativeHost.idl";
|
|
|
3
3
|
import "ReactNativeIsland.idl";
|
|
4
4
|
import "ReactInstanceSettings.idl";
|
|
5
5
|
import "IReactPackageProvider.idl";
|
|
6
|
+
import "ReactNativeWindow.idl";
|
|
6
7
|
|
|
7
8
|
#include "DocString.h"
|
|
8
9
|
|
|
@@ -14,6 +15,8 @@ namespace Microsoft.ReactNative {
|
|
|
14
15
|
// Properties
|
|
15
16
|
Microsoft.UI.Windowing.AppWindow AppWindow {get;};
|
|
16
17
|
|
|
18
|
+
ReactNativeWindow ReactNativeWindow {get;};
|
|
19
|
+
|
|
17
20
|
ReactNativeHost ReactNativeHost {get;};
|
|
18
21
|
|
|
19
22
|
ReactViewOptions ReactViewOptions {get;};
|
|
@@ -54,7 +54,29 @@ std::string GetBundleFromEmbeddedResource(const winrt::Windows::Foundation::Uri
|
|
|
54
54
|
return std::string(start, start + size);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
namespace {
|
|
58
|
+
|
|
59
|
+
std::string BufferToString(const winrt::Windows::Storage::Streams::IBuffer &buffer) {
|
|
60
|
+
std::string result(buffer.Length(), '\0');
|
|
61
|
+
if (!result.empty()) {
|
|
62
|
+
auto reader = winrt::Windows::Storage::Streams::DataReader::FromBuffer(buffer);
|
|
63
|
+
reader.ReadBytes(winrt::array_view<uint8_t>{
|
|
64
|
+
reinterpret_cast<uint8_t *>(&result[0]), reinterpret_cast<uint8_t *>(&result[result.length()])});
|
|
65
|
+
}
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
winrt::Windows::Storage::Streams::IBuffer BytesToBuffer(const void *data, uint32_t size) {
|
|
70
|
+
winrt::Windows::Storage::Streams::DataWriter writer;
|
|
71
|
+
auto bytes = static_cast<const uint8_t *>(data);
|
|
72
|
+
writer.WriteBytes(winrt::array_view<const uint8_t>(bytes, bytes + size));
|
|
73
|
+
return writer.DetachBuffer();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
} // namespace
|
|
77
|
+
|
|
78
|
+
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::Streams::IBuffer>
|
|
79
|
+
LocalBundleReader::LoadBundleAsync(const std::wstring bundleUri) {
|
|
58
80
|
try {
|
|
59
81
|
co_await winrt::resume_background();
|
|
60
82
|
|
|
@@ -66,41 +88,26 @@ std::future<std::string> LocalBundleReader::LoadBundleAsync(const std::wstring b
|
|
|
66
88
|
file = co_await winrt::Windows::Storage::StorageFile::GetFileFromApplicationUriAsync(uri);
|
|
67
89
|
} else if (bundleUri.starts_with(L"resource://")) {
|
|
68
90
|
winrt::Windows::Foundation::Uri uri(bundleUri);
|
|
69
|
-
|
|
91
|
+
auto bytes = GetBundleFromEmbeddedResource(uri);
|
|
92
|
+
co_return BytesToBuffer(bytes.data(), static_cast<uint32_t>(bytes.size()));
|
|
70
93
|
} else {
|
|
71
94
|
file = co_await winrt::Windows::Storage::StorageFile::GetFileFromPathAsync(bundleUri);
|
|
72
95
|
}
|
|
73
96
|
|
|
74
|
-
|
|
75
|
-
// roundtrip.
|
|
76
|
-
auto fileBuffer{co_await winrt::Windows::Storage::FileIO::ReadBufferAsync(file)};
|
|
77
|
-
auto dataReader{winrt::Windows::Storage::Streams::DataReader::FromBuffer(fileBuffer)};
|
|
78
|
-
|
|
79
|
-
// No need to use length + 1, STL guarantees that string storage is null-terminated.
|
|
80
|
-
std::string script(fileBuffer.Length(), '\0');
|
|
81
|
-
|
|
82
|
-
// Construct the array_view to slice into the first fileBuffer.Length bytes.
|
|
83
|
-
// DataReader.ReadBytes will read as many bytes as are present in the
|
|
84
|
-
// array_view. The backing string has fileBuffer.Length() + 1 bytes, without
|
|
85
|
-
// an explicit end it will read 1 byte to many and throw.
|
|
86
|
-
dataReader.ReadBytes(winrt::array_view<uint8_t>{
|
|
87
|
-
reinterpret_cast<uint8_t *>(&script[0]), reinterpret_cast<uint8_t *>(&script[script.length()])});
|
|
88
|
-
dataReader.Close();
|
|
89
|
-
|
|
90
|
-
co_return script;
|
|
97
|
+
co_return co_await winrt::Windows::Storage::FileIO::ReadBufferAsync(file);
|
|
91
98
|
}
|
|
92
99
|
// RuntimeScheduler only handles std::exception or jsi::JSError
|
|
93
|
-
catch (winrt::hresult_error const &
|
|
94
|
-
throw
|
|
100
|
+
catch (winrt::hresult_error const &) {
|
|
101
|
+
throw;
|
|
95
102
|
}
|
|
96
103
|
}
|
|
97
104
|
|
|
98
105
|
std::string LocalBundleReader::LoadBundle(const std::wstring &bundlePath) {
|
|
99
|
-
return LoadBundleAsync(bundlePath).get();
|
|
106
|
+
return BufferToString(LoadBundleAsync(bundlePath).get());
|
|
100
107
|
}
|
|
101
108
|
|
|
102
109
|
StorageFileBigString::StorageFileBigString(const std::wstring &path) {
|
|
103
|
-
|
|
110
|
+
m_pendingLoad = LocalBundleReader::LoadBundleAsync(path);
|
|
104
111
|
}
|
|
105
112
|
|
|
106
113
|
bool StorageFileBigString::isAscii() const {
|
|
@@ -118,8 +125,9 @@ size_t StorageFileBigString::size() const {
|
|
|
118
125
|
}
|
|
119
126
|
|
|
120
127
|
void StorageFileBigString::ensure() const {
|
|
121
|
-
if (
|
|
122
|
-
m_string =
|
|
128
|
+
if (m_pendingLoad) {
|
|
129
|
+
m_string = BufferToString(m_pendingLoad.get());
|
|
130
|
+
m_pendingLoad = nullptr;
|
|
123
131
|
}
|
|
124
132
|
}
|
|
125
133
|
|
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
#pragma once
|
|
5
5
|
#include <cxxreact/JSBigString.h>
|
|
6
|
-
#include <
|
|
6
|
+
#include <winrt/Windows.Foundation.h>
|
|
7
|
+
#include <winrt/Windows.Storage.Streams.h>
|
|
7
8
|
#include <string>
|
|
8
9
|
|
|
9
10
|
namespace Microsoft::ReactNative {
|
|
10
11
|
|
|
11
12
|
class LocalBundleReader {
|
|
12
13
|
public:
|
|
13
|
-
static
|
|
14
|
+
static winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::Streams::IBuffer> LoadBundleAsync(
|
|
15
|
+
const std::wstring bundlePath);
|
|
14
16
|
static std::string LoadBundle(const std::wstring &bundlePath);
|
|
15
17
|
};
|
|
16
18
|
|
|
@@ -24,7 +26,7 @@ class StorageFileBigString : public facebook::react::JSBigString {
|
|
|
24
26
|
void ensure() const;
|
|
25
27
|
|
|
26
28
|
private:
|
|
27
|
-
mutable
|
|
29
|
+
mutable winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::Streams::IBuffer> m_pendingLoad;
|
|
28
30
|
mutable std::string m_string;
|
|
29
31
|
};
|
|
30
32
|
|
|
@@ -161,7 +161,7 @@ bool TryUpdateForeground(
|
|
|
161
161
|
const std::string &propertyName,
|
|
162
162
|
const winrt::Microsoft::ReactNative::JSValue &propertyValue) {
|
|
163
163
|
if (propertyName == "color") {
|
|
164
|
-
auto uielement = element.try_as<xaml::UIElement>();
|
|
164
|
+
auto uielement = element.template try_as<xaml::UIElement>();
|
|
165
165
|
if (IsValidColorValue(propertyValue)) {
|
|
166
166
|
const auto brush = BrushFrom(propertyValue);
|
|
167
167
|
element.Foreground(brush);
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
#include <winrt/Windows.Foundation.h>
|
|
5
5
|
#include <winrt/Windows.Storage.FileProperties.h>
|
|
6
6
|
#include <winrt/Windows.Storage.h>
|
|
7
|
-
#include <future>
|
|
8
7
|
#include "Unicode.h"
|
|
9
8
|
|
|
10
9
|
namespace winrt {
|
|
@@ -43,7 +42,8 @@ facebook::jsi::ScriptVersion_t UwpScriptStore::getScriptVersion(const std::strin
|
|
|
43
42
|
return version;
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
winrt::Windows::Foundation::IAsyncOperation<facebook::jsi::ScriptVersion_t> UwpScriptStore::getScriptVersionAsync(
|
|
46
|
+
const std::string &bundleUri) {
|
|
47
47
|
co_await winrt::resume_background();
|
|
48
48
|
|
|
49
49
|
const winrt::hstring fileUrl(Microsoft::Common::Unicode::Utf8ToUtf16("ms-appx:///Bundle/" + bundleUri + ".bundle"));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
#include <JSI/ScriptStore.h>
|
|
3
|
-
#include <
|
|
3
|
+
#include <winrt/Windows.Foundation.h>
|
|
4
4
|
|
|
5
5
|
namespace Microsoft::ReactNative {
|
|
6
6
|
|
|
@@ -16,7 +16,8 @@ class UwpScriptStore : public facebook::jsi::ScriptStore {
|
|
|
16
16
|
static facebook::jsi::ScriptVersion_t GetFileVersion(const std::wstring &filePath);
|
|
17
17
|
|
|
18
18
|
private:
|
|
19
|
-
|
|
19
|
+
winrt::Windows::Foundation::IAsyncOperation<facebook::jsi::ScriptVersion_t> getScriptVersionAsync(
|
|
20
|
+
const std::string &bundleUri);
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
} // namespace Microsoft::ReactNative
|
|
@@ -250,7 +250,7 @@ bool FrameworkElementViewManager::UpdateProperty(
|
|
|
250
250
|
|
|
251
251
|
if (!element.IsLoaded()) {
|
|
252
252
|
element.Loaded([=](auto sender, auto &&) -> auto{
|
|
253
|
-
ApplyTransformMatrix(sender.as<xaml::UIElement>(), nodeToUpdate, transformMatrix);
|
|
253
|
+
ApplyTransformMatrix(sender.template as<xaml::UIElement>(), nodeToUpdate, transformMatrix);
|
|
254
254
|
});
|
|
255
255
|
} else {
|
|
256
256
|
ApplyTransformMatrix(element, nodeToUpdate, transformMatrix);
|
|
@@ -115,7 +115,7 @@ void ScrollViewShadowNode::createView(const winrt::Microsoft::ReactNative::JSVal
|
|
|
115
115
|
|
|
116
116
|
m_scrollViewerViewChangedRevoker = scrollViewer.ViewChanged(
|
|
117
117
|
winrt::auto_revoke, [this, scrollViewUWPImplementation](const auto &sender, const auto & /*args*/) {
|
|
118
|
-
const auto scrollViewerNotNull{sender.as<winrt::ScrollViewer>()};
|
|
118
|
+
const auto scrollViewerNotNull{sender.template as<winrt::ScrollViewer>()};
|
|
119
119
|
const auto zoomFactor{scrollViewerNotNull.ZoomFactor()};
|
|
120
120
|
if (m_zoomFactor != zoomFactor) {
|
|
121
121
|
m_zoomFactor = zoomFactor;
|
|
@@ -238,7 +238,7 @@ void ScrollViewShadowNode::updateProperties(winrt::Microsoft::ReactNative::JSVal
|
|
|
238
238
|
void ScrollViewShadowNode::AddHandlers(const winrt::ScrollViewer &scrollViewer) {
|
|
239
239
|
m_scrollViewerViewChangingRevoker =
|
|
240
240
|
scrollViewer.ViewChanging(winrt::auto_revoke, [this](const auto &sender, const auto &args) {
|
|
241
|
-
const auto scrollViewerNotNull = sender.as<winrt::ScrollViewer>();
|
|
241
|
+
const auto scrollViewerNotNull = sender.template as<winrt::ScrollViewer>();
|
|
242
242
|
|
|
243
243
|
// If we are transitioning to inertial scrolling.
|
|
244
244
|
if (m_isScrolling && !m_isScrollingFromInertia && args.IsInertial()) {
|
|
@@ -281,7 +281,7 @@ void ScrollViewShadowNode::AddHandlers(const winrt::ScrollViewer &scrollViewer)
|
|
|
281
281
|
m_SIPEventHandler->TryHide();
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
const auto scrollViewer = sender.as<winrt::ScrollViewer>();
|
|
284
|
+
const auto scrollViewer = sender.template as<winrt::ScrollViewer>();
|
|
285
285
|
EmitScrollEvent(
|
|
286
286
|
scrollViewer,
|
|
287
287
|
m_tag,
|
|
@@ -294,7 +294,7 @@ void ScrollViewShadowNode::AddHandlers(const winrt::ScrollViewer &scrollViewer)
|
|
|
294
294
|
|
|
295
295
|
m_scrollViewerDirectManipulationCompletedRevoker =
|
|
296
296
|
scrollViewer.DirectManipulationCompleted(winrt::auto_revoke, [this](const auto &sender, const auto &) {
|
|
297
|
-
const auto scrollViewer = sender.as<winrt::ScrollViewer>();
|
|
297
|
+
const auto scrollViewer = sender.template as<winrt::ScrollViewer>();
|
|
298
298
|
if (m_isScrollingFromInertia) {
|
|
299
299
|
EmitScrollEvent(
|
|
300
300
|
scrollViewer,
|
|
@@ -320,7 +320,7 @@ void ScrollViewShadowNode::AddHandlers(const winrt::ScrollViewer &scrollViewer)
|
|
|
320
320
|
});
|
|
321
321
|
m_controlLoadedRevoker = scrollViewer.Loaded(winrt::auto_revoke, [this](const auto &sender, const auto &) {
|
|
322
322
|
if (m_changeViewAfterLoaded) {
|
|
323
|
-
const auto scrollViewer = sender.as<winrt::ScrollViewer>();
|
|
323
|
+
const auto scrollViewer = sender.template as<winrt::ScrollViewer>();
|
|
324
324
|
scrollViewer.ChangeView(nullptr, nullptr, static_cast<float>(m_zoomFactor));
|
|
325
325
|
m_changeViewAfterLoaded = false;
|
|
326
326
|
}
|
|
@@ -166,7 +166,7 @@ class TextShadowNode final : public ShadowNodeBase {
|
|
|
166
166
|
|
|
167
167
|
m_selectionChangedRevoker = xamlView.as<xaml::Controls::TextBlock>().SelectionChanged(
|
|
168
168
|
winrt::auto_revoke, [selectionChanged = this->selectionChanged](const auto &sender, auto &&) {
|
|
169
|
-
const auto textBlock = sender.as<xaml::Controls::TextBlock>();
|
|
169
|
+
const auto textBlock = sender.template as<xaml::Controls::TextBlock>();
|
|
170
170
|
*selectionChanged =
|
|
171
171
|
*selectionChanged || textBlock.SelectionStart().Offset() != textBlock.SelectionEnd().Offset();
|
|
172
172
|
});
|
|
@@ -158,6 +158,22 @@
|
|
|
158
158
|
</ClCompile>
|
|
159
159
|
<ClCompile Include="$(NodeApiJsiSrcDir)NodeApiJsiRuntime.cpp">
|
|
160
160
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
161
|
+
<!--
|
|
162
|
+
Workaround for a Visual Studio 2026 (v145) C++ optimizer bug. With
|
|
163
|
+
optimizations on, this translation unit is miscompiled such that the
|
|
164
|
+
pointer-value-scope teardown in NodeApiJsiRuntime hands Hermes a stale
|
|
165
|
+
napi_value, crashing in hermes!JSProxy::defineOwnProperty (via
|
|
166
|
+
napi_create_reference) during rapid UI updates - e.g. the
|
|
167
|
+
e2e-test-app-fabric visitAllPages test. Building this file without
|
|
168
|
+
optimization (verified equivalent to `#pragma optimize("", off)`)
|
|
169
|
+
avoids it. We must also opt out of /GL here so the disabled
|
|
170
|
+
optimization survives link-time code generation. NodeApiJsiRuntime.cpp
|
|
171
|
+
is externally provided, so the workaround lives here rather than in the
|
|
172
|
+
source. Scoped to v145+ (the bug does not reproduce on v143); remove
|
|
173
|
+
when the compiler bug is fixed.
|
|
174
|
+
-->
|
|
175
|
+
<Optimization Condition="$(PlatformToolsetVersion)>=145">Disabled</Optimization>
|
|
176
|
+
<WholeProgramOptimization Condition="$(PlatformToolsetVersion)>=145">false</WholeProgramOptimization>
|
|
161
177
|
</ClCompile>
|
|
162
178
|
</ItemGroup>
|
|
163
179
|
<ItemGroup Condition="'$(BuildMSRNCxxNodeApiJsiLoader)' != 'false'">
|
|
@@ -527,7 +527,8 @@ struct ModuleJsiInitMethodInfo<void (TModule::*)(ReactContext const &, facebook:
|
|
|
527
527
|
return
|
|
528
528
|
[module = static_cast<ModuleType *>(module), method](
|
|
529
529
|
ReactContext const &reactContext, winrt::Windows::Foundation::IInspectable const &runtimeHandle) noexcept {
|
|
530
|
-
|
|
530
|
+
if (runtimeHandle)
|
|
531
|
+
(module->*method)(reactContext, GetOrCreateContextRuntime(reactContext, runtimeHandle));
|
|
531
532
|
};
|
|
532
533
|
}
|
|
533
534
|
};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
|
16
16
|
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.22621.0</TargetPlatformVersion>
|
|
17
17
|
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
|
18
|
-
<MinimumVisualStudioVersion>
|
|
18
|
+
<MinimumVisualStudioVersion>18.0</MinimumVisualStudioVersion>
|
|
19
19
|
<FileAlignment>512</FileAlignment>
|
|
20
20
|
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
21
21
|
<DocumentationFile>bin\$(Platform)\$(Configuration)\Microsoft.ReactNative.Managed.XML</DocumentationFile>
|
|
@@ -153,8 +153,8 @@
|
|
|
153
153
|
</ItemGroup>
|
|
154
154
|
</When>
|
|
155
155
|
</Choose>
|
|
156
|
-
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '
|
|
157
|
-
<VisualStudioVersion>
|
|
156
|
+
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '18.0' ">
|
|
157
|
+
<VisualStudioVersion>18.0</VisualStudioVersion>
|
|
158
158
|
</PropertyGroup>
|
|
159
159
|
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
|
160
160
|
<Target Name="Deploy" />
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<PropertyGroup>
|
|
4
4
|
<OutputType>Exe</OutputType>
|
|
5
5
|
|
|
6
|
-
<TargetFramework>
|
|
6
|
+
<TargetFramework>net10.0</TargetFramework>
|
|
7
7
|
<Platforms>x64;x86;ARM64</Platforms>
|
|
8
8
|
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
|
|
9
9
|
|
|
@@ -30,19 +30,9 @@
|
|
|
30
30
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.1" />
|
|
31
31
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.3.1" />
|
|
32
32
|
<PackageReference Include="RuntimeContracts" Version="0.3.0" />
|
|
33
|
-
|
|
34
|
-
<!--
|
|
35
|
-
NuGet decides to pull in packages with issues. There is no seeming way to diagnose why NuGet is pulling in those versions.
|
|
36
|
-
Running restore with -Verbosity Detailed and environment variables:
|
|
37
|
-
* NUGET_RESTORE_MSBUILD_ARGS=/bl:c:\temp\nuget.binlog
|
|
38
|
-
* NUGET_RESTORE_MSBUILD_VERBOSITY=diag
|
|
39
|
-
resulted in no mention of version 4.3.0 anywhere until NuGet just starts downloading it.
|
|
40
|
-
Therefore manually overriding the version so NuGet uses the latest.
|
|
41
|
-
-->
|
|
42
|
-
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
|
|
43
33
|
</ItemGroup>
|
|
44
34
|
|
|
45
|
-
<!--
|
|
35
|
+
<!--
|
|
46
36
|
This target is used to ensure the tool is deployed and can be used from source.
|
|
47
37
|
It will return all deployed files so the caller can implement incrementality properly
|
|
48
38
|
-->
|
|
@@ -53,7 +43,7 @@
|
|
|
53
43
|
</ItemGroup>
|
|
54
44
|
</Target>
|
|
55
45
|
|
|
56
|
-
<!--
|
|
46
|
+
<!--
|
|
57
47
|
This target returns the location of the deployed executable.
|
|
58
48
|
-->
|
|
59
49
|
<Target Name="GetPublishedToolPath" DependsOnTargets="PublishTool" Returns="@(_PublishedToolExecutable)">
|
|
@@ -62,13 +52,13 @@
|
|
|
62
52
|
</ItemGroup>
|
|
63
53
|
</Target>
|
|
64
54
|
|
|
65
|
-
<!--
|
|
55
|
+
<!--
|
|
66
56
|
This is used during the PR build to ensure we have the artifacts published during the build.
|
|
67
57
|
-->
|
|
68
|
-
<Target
|
|
69
|
-
Name="PublishToolDuringBuild"
|
|
70
|
-
DependsOnTargets="Publish"
|
|
71
|
-
AfterTargets="Build"
|
|
58
|
+
<Target
|
|
59
|
+
Name="PublishToolDuringBuild"
|
|
60
|
+
DependsOnTargets="Publish"
|
|
61
|
+
AfterTargets="Build"
|
|
72
62
|
Condition="'$(PublishToolDuringBuild)' == 'true'">
|
|
73
63
|
</Target>
|
|
74
64
|
|
package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<PublishProtocol>FileSystem</PublishProtocol>
|
|
7
7
|
<Configuration>Debug</Configuration>
|
|
8
8
|
<Platform>x64</Platform>
|
|
9
|
-
<TargetFramework>
|
|
9
|
+
<TargetFramework>net10.0</TargetFramework>
|
|
10
10
|
<PublishDir>$(OutDir)publish</PublishDir>
|
|
11
11
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
|
12
12
|
<SelfContained>true</SelfContained>
|
package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<PublishProtocol>FileSystem</PublishProtocol>
|
|
7
7
|
<Configuration>Release</Configuration>
|
|
8
8
|
<Platform>x64</Platform>
|
|
9
|
-
<TargetFramework>
|
|
9
|
+
<TargetFramework>net10.0</TargetFramework>
|
|
10
10
|
<PublishDir>$(OutDir)publish</PublishDir>
|
|
11
11
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
|
12
12
|
<SelfContained>true</SelfContained>
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.81.
|
|
13
|
+
<ReactNativeWindowsVersion>0.81.28</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>81</ReactNativeWindowsMinor>
|
|
16
|
-
<ReactNativeWindowsPatch>
|
|
16
|
+
<ReactNativeWindowsPatch>28</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>d58e4482057a5e9e6395793b5f7d4c626cf04046</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<!-- Enabling this will (1) Include hermes glues in the Microsoft.ReactNative binaries AND (2) Make hermes the default engine -->
|
|
7
7
|
<UseHermes Condition="'$(UseHermes)' == ''">true</UseHermes>
|
|
8
8
|
<!-- This will be true if (1) the client want to use hermes by setting UseHermes to true OR (2) We are building for UWP where dynamic switching is enabled -->
|
|
9
|
-
<HermesVersion Condition="'$(HermesVersion)' == ''">0.0.0-
|
|
9
|
+
<HermesVersion Condition="'$(HermesVersion)' == ''">0.0.0-2604.21001-94aa5e1d</HermesVersion>
|
|
10
10
|
<HermesPackageName Condition="'$(HermesPackageName)' == ''">Microsoft.JavaScript.Hermes</HermesPackageName>
|
|
11
11
|
<HermesPackage Condition="'$(HermesPackage)' == '' And Exists('$(PkgMicrosoft_JavaScript_Hermes)')">$(PkgMicrosoft_JavaScript_Hermes)</HermesPackage>
|
|
12
12
|
<HermesPackage Condition="'$(HermesPackage)' == ''">$(NuGetPackageRoot)\$(HermesPackageName)\$(HermesVersion)</HermesPackage>
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
|
|
44
44
|
<PropertyGroup Label="ExternalDependencies">
|
|
45
45
|
<!-- Google Test Adapter -->
|
|
46
|
-
<!--
|
|
47
|
-
<Force-Enable-Microsoft-googletest-v140-windesktop-msvcstl-static-rt-dyn>
|
|
46
|
+
<!-- If ApplicationType is set, adapter include paths won't be set for MSVC 14.0 (v140) or later -->
|
|
47
|
+
<Force-Enable-Microsoft-googletest-v140-windesktop-msvcstl-static-rt-dyn>true</Force-Enable-Microsoft-googletest-v140-windesktop-msvcstl-static-rt-dyn>
|
|
48
48
|
</PropertyGroup>
|
|
49
49
|
|
|
50
50
|
<!--
|
|
@@ -138,7 +138,8 @@
|
|
|
138
138
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
139
139
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
|
140
140
|
<ShowIncludes Condition="'$(ShowIncludes)'=='true'">true</ShowIncludes>
|
|
141
|
-
<AdditionalOptions>/utf-8 %(AdditionalOptions)
|
|
141
|
+
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
|
142
|
+
<AdditionalOptions Condition="$(PlatformToolsetVersion)<145">%(AdditionalOptions) /await</AdditionalOptions>
|
|
142
143
|
<ControlFlowGuard>Guard</ControlFlowGuard>
|
|
143
144
|
<SpectreMitigation>Spectre</SpectreMitigation>
|
|
144
145
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<PropertyGroup Label="WinUI3 versioning">
|
|
4
4
|
|
|
5
|
-
<!--
|
|
5
|
+
<!--
|
|
6
6
|
Internal versions are typically only located at: https://microsoft.visualstudio.com/DefaultCollection/ProjectReunion/_artifacts/feed/Project.Reunion.nuget.internal/NuGet/Microsoft.WindowsAppSDK/versions
|
|
7
7
|
For local testing of internal versions, modify WinUI3ExperimentalVersion, and comment out the additional nuget source in NuGet.Config
|
|
8
8
|
When this version is updated, be sure to update the default for the enableInternalFeed parameter of /.ado/templates/enable-experimental-winui3.yml
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<WinUI3ExperimentalVersion Condition="'$(WinUI3ExperimentalVersion)'==''">1.8.251106002</WinUI3ExperimentalVersion>
|
|
11
11
|
<!-- This value is also used by the CLI, see /packages/@react-native-windows/cli/.../autolinkWindows.ts -->
|
|
12
12
|
<WinUI3Version Condition="'$(WinUI3Version)'=='' AND '$(UseExperimentalWinUI3)'=='true'">$(WinUI3ExperimentalVersion)</WinUI3Version>
|
|
13
|
-
<WinUI3Version Condition="'$(WinUI3Version)'==''">1.8.
|
|
13
|
+
<WinUI3Version Condition="'$(WinUI3Version)'==''">1.8.260508005</WinUI3Version>
|
|
14
14
|
<!-- This is needed to prevent build errors with WinAppSDK >= 1.7 trying to double build WindowsAppRuntimeAutoInitializer.cpp -->
|
|
15
15
|
<WindowsAppSdkAutoInitialize Condition="'$(WindowsAppSdkAutoInitialize)'=='' And $([MSBuild]::VersionGreaterThan('$(WinUI3Version)', '1.7.0'))">false</WindowsAppSdkAutoInitialize>
|
|
16
16
|
</PropertyGroup>
|
package/Scripts/JustMyXaml.ps1
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# This script enables or disables VS
|
|
1
|
+
# This script enables or disables VS 2026's JustMyXaml feature
|
|
2
2
|
[CmdletBinding()]
|
|
3
3
|
param([bool]$Enable)
|
|
4
4
|
|
|
@@ -7,14 +7,14 @@ if (!([bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
$instanceId = & "$(${env:ProgramFiles(x86)})\Microsoft Visual Studio\Installer\vswhere.exe" -property instanceId
|
|
10
|
-
$hiveFile = "$($env:LocalAppData)\Microsoft\VisualStudio\
|
|
11
|
-
& reg.exe load HKLM\
|
|
12
|
-
New-PSDrive -Name
|
|
13
|
-
$currentValue = (Get-ItemProperty
|
|
10
|
+
$hiveFile = "$($env:LocalAppData)\Microsoft\VisualStudio\18.0_$instanceId\privateregistry.bin"
|
|
11
|
+
& reg.exe load HKLM\VS2026_HIVE $hiveFile | Out-Null
|
|
12
|
+
New-PSDrive -Name VS2026 -PSProvider Registry -Root HKLM\VS2026_HIVE -ErrorAction Stop | Out-Null
|
|
13
|
+
$currentValue = (Get-ItemProperty VS2026:\Software\Microsoft\VisualStudio\18.0_$instanceId\Debugger -Name EnableXamlVisualDiagnosticsJustMyXaml).EnableXamlVisualDiagnosticsJustMyXaml
|
|
14
14
|
if ($currentValue -eq 0) { $currentValue = $false; } else { $currentValue = $true; }
|
|
15
15
|
Write-Host "Current value: $currentValue"
|
|
16
16
|
if ($Enable) { $newValue = 1; } else { $newValue = 0; }
|
|
17
|
-
Set-ItemProperty
|
|
17
|
+
Set-ItemProperty VS2026:\Software\Microsoft\VisualStudio\18.0_$instanceId\Debugger -Name EnableXamlVisualDiagnosticsJustMyXaml -Value $newValue -Type DWord
|
|
18
18
|
Write-Host "New value: $Enable"
|
|
19
|
-
Remove-PSDrive -Name
|
|
20
|
-
& reg.exe unload HKLM\
|
|
19
|
+
Remove-PSDrive -Name VS2026
|
|
20
|
+
& reg.exe unload HKLM\VS2026_HIVE | Out-Null
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
param(
|
|
2
|
+
[switch] $SkipLockDeletion
|
|
2
3
|
)
|
|
3
4
|
|
|
4
5
|
[string] $RepoRoot = Resolve-Path "$PSScriptRoot\..\.."
|
|
@@ -6,16 +7,17 @@ param(
|
|
|
6
7
|
$StartingLocation = Get-Location
|
|
7
8
|
Set-Location -Path $RepoRoot
|
|
8
9
|
|
|
9
|
-
try
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
try {
|
|
11
|
+
if (-not $SkipLockDeletion) {
|
|
12
|
+
# Delete existing lock files
|
|
13
|
+
$existingLockFiles = (Get-ChildItem -File -Recurse -Path $RepoRoot -Filter *.lock.json)
|
|
14
|
+
$existingLockFiles | Foreach-Object {
|
|
15
|
+
Write-Host Deleting $_.FullName
|
|
16
|
+
Remove-Item $_.FullName
|
|
17
|
+
}
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
$packagesSolutions = (Get-ChildItem -File -Recurse -Path $RepoRoot\packages -Filter *.sln )| Where-Object { !$_.FullName.Contains('node_modules') -and !$_.FullName.Contains('e2etest') }
|
|
20
|
+
$packagesSolutions = (Get-ChildItem -File -Recurse -Path $RepoRoot\packages -Filter *.sln ) | Where-Object { !$_.FullName.Contains('node_modules') -and !$_.FullName.Contains('e2etest') }
|
|
19
21
|
$vnextSolutions = (Get-ChildItem -File -Path $RepoRoot\vnext -Filter *.sln)
|
|
20
22
|
|
|
21
23
|
# Run all solutions with their defaults
|
|
@@ -25,20 +27,12 @@ try
|
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
# Re-run solutions that build with UseExperimentalWinUI3
|
|
28
|
-
$experimentalSolutions = @("playground-composition.sln", "Microsoft.ReactNative.
|
|
30
|
+
$experimentalSolutions = @("playground-composition.sln", "Microsoft.ReactNative.NewArch.sln", "ReactWindows-Desktop.sln");
|
|
29
31
|
$($packagesSolutions; $vnextSolutions) | Where-Object { $experimentalSolutions -contains $_.Name } | Foreach-Object {
|
|
30
32
|
Write-Host Restoring $_.FullName with UseExperimentalWinUI3=true
|
|
31
33
|
& msbuild /t:Restore /p:RestoreForceEvaluate=true /p:UseExperimentalWinUI3=true $_.FullName
|
|
32
34
|
}
|
|
33
|
-
|
|
34
|
-
# Re-run solutions that build with Chakra
|
|
35
|
-
$chakraSolutions = @("ReactUWPTestApp.sln", "integrationtest.sln");
|
|
36
|
-
$($packagesSolutions; $vnextSolutions) | Where-Object { $chakraSolutions -contains $_.Name } | Foreach-Object {
|
|
37
|
-
Write-Host Restoring $_.FullName with UseHermes=false
|
|
38
|
-
& msbuild /t:Restore /p:RestoreForceEvaluate=true /p:UseHermes=false $_.FullName
|
|
39
|
-
}
|
|
40
35
|
}
|
|
41
|
-
finally
|
|
42
|
-
{
|
|
36
|
+
finally {
|
|
43
37
|
Set-Location -Path "$StartingLocation"
|
|
44
38
|
}
|
package/Scripts/UnitTest.ps1
CHANGED
|
@@ -23,7 +23,9 @@ param (
|
|
|
23
23
|
"ReactCommon.UnitTests\ReactCommon.UnitTests.exe")
|
|
24
24
|
),
|
|
25
25
|
|
|
26
|
-
[System.IO.FileInfo] $VsTest =
|
|
26
|
+
[System.IO.FileInfo] $VsTest =
|
|
27
|
+
"$(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath)\" +
|
|
28
|
+
"Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"
|
|
27
29
|
)
|
|
28
30
|
|
|
29
31
|
if ($Include.Count) {
|