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

Fix WinFX casing and targets import #5425

Closed
wants to merge 4 commits into from
Closed

Fix WinFX casing and targets import #5425

wants to merge 4 commits into from

Conversation

Nirmal4G
Copy link
Contributor

@Nirmal4G Nirmal4G commented Jun 13, 2020

I brought all the changes from #5346 and fixed import of WinFX targets on case-sensitive file-system and then updated #5200 logic.

<Import Project="$(MSBuildToolsPath)\Microsoft.WinFX.targets" Condition="'$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetCompactFramework)' != 'true' and Exists('$(MSBuildToolsPath)\Microsoft.WinFX.targets')"/>

<Import Project="$(MSBuildToolsPath)\Microsoft.WinFX.targets" Condition="'$(TargetFrameworkIdentifier)' == 'Silverlight' and Exists('$(MSBuildToolsPath)\Microsoft.WinFX.targets')"/>

These targets point to WinFX casing but has WinFx casing in the MSBuildToolsPath. This will result in file not found, if the targets get imported in a case-sensitive file-system. Since, no one used WinFX targets on Mono, they have not been reported, I think.

Also NETFX 2 has WinFX casing but NETFX 4 has WinFx casing. So, In order to cope with both WinFX and WinFx, I renamed the redirection targets to the correct case and then added a workaround which F# team uses to import either ones on a case-sensitive file system.

'WinFX' is the correct casing as observed in the .NET CLR 2 frameworks
In project files, scripts, comments, etc...
However, the correct casing is 'WinFX', as observed in the .NET CLR 2 framework disk layout.
This is similar to, what the F# team used in their targets, to cope with the case-sensitive file-systems.

Make sure to let others know that we're importing NETFX's WinFX targets instead.
for only previously changed files (in this Patch tree)
Conforming to the repository's EditorConfig file
@Nirmal4G Nirmal4G marked this pull request as ready for review June 13, 2020 10:49
@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 5425 in repo microsoft/msbuild

Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

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

Team triage: As in #5346, we don't think this fix is worth making.

@Nirmal4G
Copy link
Contributor Author

Nirmal4G commented Jun 18, 2020

@rainersigwald please read the PR carefully. It's not exactly the same one as before.

As you've said, the casing was different. So, I fixed it to support both the cases. I made sure that we would not regress anything.

Also, I've made changes to the way the ImportFrameworkWinFXTargets is used. So this PR is required.

Please reconsider and reopen this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants