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

Muti target 5.0 second part #3155

Merged
merged 2 commits into from
Jul 7, 2020
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
17 changes: 0 additions & 17 deletions eng/WpfArcadeSdk/tools/Pbt.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project>
<PropertyGroup>
<LocalMicrosoftWinFXProps>$(RepoRoot)src\Microsoft.DotNet.Wpf\src\PresentationBuildTasks\Microsoft.WinFX.props</LocalMicrosoftWinFXProps>
<LocalMicrosoftWinFXTargets>$(RepoRoot)src\Microsoft.DotNet.Wpf\src\PresentationBuildTasks\Microsoft.WinFX.targets</LocalMicrosoftWinFXTargets>
</PropertyGroup>

Expand Down Expand Up @@ -35,8 +34,6 @@
Project="../targets/Microsoft.NET.Sdk.WindowsDesktop.props"
Condition="!Exists('$(LocalMicrosoftWinFXTargets)') And '$(InternalMarkupCompilation)'=='true'"/>

We need Microsoft.WinFX.props though, so that's imported here specifically.

The use of Microsoft.NET.Sdk.WindowsDesktop doesn't break the source-build promise.
- Microsoft.NET.Sdk.WindowsDesktop is built from sources
- It is used for compilation of assemblies in dotnet-wpf-int (the internal WPF repo), and serves as a
Expand All @@ -46,18 +43,4 @@
as a convenient 'transport package').
-->

<!--
If local PresentationBuildTasks project is present, then import WinFX.props from local sources;
otherwise import Microsoft.NET.Sdk.WindowsDesktop.props from Microsoft.NET.Sdk.WindowsDesktop

We can not really test for $(InternalMarkupCompilation)==true here. It is usually defined
in the csproj - which is included after props (but before targets).
-->
<Import Project="$(WpfSourceDir)PresentationBuildTasks\Microsoft.WinFX.props"
Condition="Exists('$(LocalMicrosoftWinFXProps)') "/>

<Import Sdk="Microsoft.NET.Sdk.WindowsDesktop"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not very sure deleting that is safe. However, after the last change, Microsoft.WinFX.props files is empty

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you confirm that this is still picking up the locally built version of PresentationBuildTasks?

Copy link
Member

@vatsan-madhavan vatsan-madhavan Jun 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (the ‘otherwise import Windowsdesktop props’ part) can only be tested by flowing (simulating the flow) the wpf.arcade package to the wpf-int repo, and building a project there that relies on InternalMarkupCompilation. One may not exist there today, but creating a test app that does should be quite easy.

This functionality may important to retain for future use by the test repo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I now see that InternalMarkupCompilation isn't set in the WPF repo.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I have no idea what you are talking about. What is the action item here? Can I remove this or not? I could left the empty WinFXProps file if we need it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wli3: Can you add the replacement of pbt.props/targets in to your refactoring work issue? Thanks.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have doc for what pbt.props/targets is for? I did read the binlog of build of wpf repo. But I still don't have a clue

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some description in the markdown file. Sorry, I don't believe there is a separate doc with a more detailed description. We can discuss it during the meeting later today. Thanks.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have any on boarding document that I can read in the meanwhile?

Project="../targets/Microsoft.WinFX.props"
Condition="!Exists('$(LocalMicrosoftWinFXProps)') And
Exists('../targets/Microsoft.WinFX.props')"/>
</Project>
12 changes: 5 additions & 7 deletions packaging/Microsoft.NET.Sdk.WindowsDesktop/Sdk/Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ Copyright (c) .NET Foundation. All rights reserved.

<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />

<!-- The MicrosoftWindowsDesktopSdkPath is a hook so that you can redirect to a local version of the WPF SDK targets
(ie in order to test changes locally) without modifying the .NET Core SDK itself. This should work
as long as there are no changes to Sdk.props and Sdk.targets themselves. -->
<PropertyGroup Condition="'$(MicrosoftWindowsDesktopSdkPath)' == ''">
<MicrosoftWindowsDesktopSdkPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)\..\targets))</MicrosoftWindowsDesktopSdkPath>
<!-- Set ImportWindowsDesktopTargets to force import WindowsDesktop Targets to enable pre 5.0 behavior.
Post 5.0, Microsoft.NET.Sdk.WindowsDesktop.props will always be imported by SDK
-->
<PropertyGroup>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>

<Import Project="$(MicrosoftWindowsDesktopSdkPath)\Microsoft.NET.Sdk.WindowsDesktop.props "/>

</Project>
3 changes: 1 addition & 2 deletions packaging/Microsoft.NET.Sdk.WindowsDesktop/Sdk/Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Copyright (c) .NET Foundation. All rights reserved.
<Project>

<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />

<Import Project="$(MicrosoftWindowsDesktopSdkPath)\Microsoft.NET.Sdk.WindowsDesktop.targets "/>

<!--Post 5.0, Microsoft.NET.Sdk.WindowsDesktop.targets will be imported by SDK conditionally-->
</Project>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
content\targets\
-->
<ItemGroup>
<PackagingContent Include="$(MSBuildThisFileDirectory)Microsoft.WinFX.props" SubFolder="root\targets" />
<PackagingContent Include="$(MSBuildThisFileDirectory)Microsoft.WinFX.targets" SubFolder="root\targets" />
</ItemGroup>

Expand Down