Skip to content

Commit c305cfd

Browse files
Move unneeded ReactNativeHost out of ReactWindows-Desktop
`//vnect/Shared/Shared.vcxitems` is included by two project: 1. `//vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj` 2. `//vnext/Desktop/React.Windows.Desktop.vcxproj` (2) is a static library that doesn’t require `ReactNativeHost` compilation units. Drop them as having them leads to compiler errors due to `ReactNativeHost.cpp` including `XamlApplication.h` which in turn includes `Xaml.XamlApplication.g.*` which requires `XamlApplication.idl` to be generating them. This won’t happen due to the project type of (2).
1 parent af97183 commit c305cfd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vnext/Shared/Shared.vcxitems

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263
<DependentUpon>.$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactPackageBuilder.idl</DependentUpon>
264264
</ClCompile>
265265
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactNativeHost.cpp">
266+
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true' OR '$(SupportWinUI3Islands)' != 'true'">true</ExcludedFromBuild>
266267
<DependentUpon>$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactNativeHost.idl</DependentUpon>
267268
</ClCompile>
268269
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\RedBoxHandler.cpp">
@@ -580,11 +581,11 @@
580581
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\QuirkSettings.idl" />
581582
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactCoreInjection.idl" />
582583
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactInstanceSettings.idl" />
583-
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactNativeHost.idl" />
584584
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\RedBoxHandler.idl" />
585585
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Timer.idl" />
586586
</ItemGroup>
587587
<ItemGroup Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'">
588+
<Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactNativeHost.idl" />
588589
<Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\ComponentView.idl" />
589590
<Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\Composition.Input.idl" />
590591
<Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\CompositionComponentView.idl" />

0 commit comments

Comments
 (0)