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

Use property function instead of $(OS) #5916

Merged
merged 1 commit into from
Dec 3, 2020

Conversation

rainersigwald
Copy link
Member

This is more resilient to having the environment variable OS set.

This is more resilient to having the environment variable OS set.
@benvillalobos
Copy link
Member

benvillalobos commented Nov 25, 2020

There's also a use of $(OS) in Directory.Build.props on line 29.
rg -Fi "$(OS)"

src\Tasks\Microsoft.Common.CurrentVersion.targets
92:    <TargetPlatformSdkPath Condition="'$(TargetPlatformSdkPath)' == '' and '$(TargetPlatformIdentifier)' == 'Windows' and '$(OS)' == 'Windows_NT' and '$(MSBuildRuntimeType)' != 'Core'">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v$(TargetPlatformVersion)', InstallationFolder, null, RegistryView.Registry32, RegistryView.Default))</TargetPlatformSdkPath>

Directory.Build.props
29:    <TargetPlatformIdentifier Condition="'$(TargetPlatformIdentifier)'==''">$(OS)</TargetPlatformIdentifier>

Not sure where it's being set, as rg -Fi "<OS" doesn't gibe any relevant results.

@rainersigwald
Copy link
Member Author

Yeah, I saw that one and didn't fully understand it so didn't mess with it. I think it might just be useless?

Copy link
Member

@benvillalobos benvillalobos left a comment

Choose a reason for hiding this comment

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

Ideally we remove the other instance of $(OS) or get more context on it, but for the purpose of this PR I'm fine with merging.

@rainersigwald rainersigwald merged commit d39f2e4 into dotnet:master Dec 3, 2020
@rainersigwald rainersigwald deleted the scrub-for-OS branch December 3, 2020 22:44
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.

3 participants