Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant items in .targets #1687

Merged
merged 4 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion nuget/Microsoft.Windows.CsWinRT.Authoring.targets
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Copyright (C) Microsoft Corporation. All rights reserved.
<CompilerVisibleProperty Include="CsWinRTWindowsMetadata" />
<CompilerVisibleProperty Include="CsWinRTGenerateProjection" />
<CompilerVisibleProperty Include="CsWinRTAuthoringInputs" />
<CompilerVisibleProperty Include="CsWinRTUseWindowsUIXamlProjections" />
</ItemGroup>

<!-- Note this runs before the msbuild editor config file is generated because that is what is used to pass properties to the source generator. -->
Expand Down
18 changes: 5 additions & 13 deletions nuget/Microsoft.Windows.CsWinRT.targets
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,6 @@ $(CsWinRTInternalProjection)
</ItemGroup>
</Target>

<ItemGroup>
<RuntimeHostConfigurationOption Include="CsWinRT.UiXamlMode" Condition="'$(CsWinRTUiXamlMode)' != ''">
<Value>$(CsWinRTUiXamlMode)</Value>
<Trim>true</Trim>
</RuntimeHostConfigurationOption>
</ItemGroup>

<Import Project="$(MSBuildThisFileDirectory)Microsoft.Windows.CsWinRT.Prerelease.targets" Condition="Exists('$(MSBuildThisFileDirectory)Microsoft.Windows.CsWinRT.Prerelease.targets')"/>
<Import Project="$(MSBuildThisFileDirectory)Microsoft.Windows.CsWinRT.Authoring.targets" Condition="'$(CsWinRTComponent)' == 'true'"/>
<Import Project="$(MSBuildThisFileDirectory)Microsoft.Windows.CsWinRT.IIDOptimizer.targets" Condition="'$(CsWinRTIIDOptimizerOptOut)' != 'true'"/>
Expand All @@ -328,7 +321,11 @@ $(CsWinRTInternalProjection)
<CsWinRTEnableICustomPropertyProviderSupport Condition="'$(CsWinRTEnableICustomPropertyProviderSupport)' == ''">true</CsWinRTEnableICustomPropertyProviderSupport>
<CsWinRTEnableIReferenceSupport Condition="'$(CsWinRTEnableIReferenceSupport)' == ''">true</CsWinRTEnableIReferenceSupport>
<CsWinRTEnableIDynamicInterfaceCastableSupport Condition="'$(CsWinRTEnableIDynamicInterfaceCastableSupport)' == ''">true</CsWinRTEnableIDynamicInterfaceCastableSupport>
<CsWinRTUseWindowsUIXamlProjections Condition="'$(CsWinRTUseWindowsUIXamlProjections)' == ''">false</CsWinRTUseWindowsUIXamlProjections>

<!--
Note: the 'CsWinRTUseWindowsUIXamlProjections' property and associated 'CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS' feature
switch are set by the .NET SDK, so that the right projection mode is enabled even when CsWinRT is not directly referenced.
-->
</PropertyGroup>

<!-- Default values for all other CsWinRT properties (without feature switches) -->
Expand Down Expand Up @@ -371,11 +368,6 @@ $(CsWinRTInternalProjection)
<RuntimeHostConfigurationOption Include="CSWINRT_ENABLE_IDYNAMICINTERFACECASTABLE"
Value="$(CsWinRTEnableIDynamicInterfaceCastableSupport)"
Trim="true" />

<!-- CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS switch -->
<RuntimeHostConfigurationOption Include="CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS"
Value="$(CsWinRTUseWindowsUIXamlProjections)"
Trim="true" />
</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions src/Tests/AuthoringWuxTest/AuthoringWuxTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
<!-- <CsWinRTEnableLogging>true</CsWinRTEnableLogging> -->
<!--<CsWinRTKeepGeneratedSources>true</CsWinRTKeepGeneratedSources>-->
</PropertyGroup>

<!-- Temporary workaround, remove when https://github.com/dotnet/sdk/pull/41936 is available in the .NET SDK -->
<ItemGroup>
<CompilerVisibleProperty Include="CsWinRTUseWindowsUIXamlProjections" />
<RuntimeHostConfigurationOption Include="CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS"
Value="$(CsWinRTUseWindowsUIXamlProjections)"
Trim="true" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Projections\Windows\Windows.csproj" />
Expand Down