Skip to content

Conversation

@dfederm
Copy link
Contributor

@dfederm dfederm commented Mar 22, 2023

Prefer sln-defined platforms for command-line builds over dynamic platform resolution

Today dynamic platform resolution is inconsistent due to the condition being based on $(BuildingInsideVisualStudio), which is obviously only set in VS. Sln-based command-line builds wouldn't have that set though, so dynamic platform resolution would end up running. The comment on _GetProjectReferencePlatformProperties implies that sln-provided platforms should be used instead though, so this change switches the condition to check $(CurrentSolutionConfigurationContents) instead to make the experience consistent when building a sln in VS or command-line.

@MIchaelRShea
Copy link
Contributor

This looks good to me. Potentially outside the scope of this PR but I do wonder if it makes sense to warn devs building slns with dynamicplatformresolution turned on that behavior will be different in slns vs non slns

@rainersigwald rainersigwald added this to the VS 17.6 milestone Mar 28, 2023
@rainersigwald rainersigwald changed the base branch from main to vs17.6 March 30, 2023 14:38
@rainersigwald rainersigwald enabled auto-merge (squash) March 30, 2023 14:39
@rainersigwald
Copy link
Member

Passed on a similar baseline earlier, and all legs except macOS are passing now--but macOS hasn't gotten a machine for 30+ minutes. I'm going to merge.

@rainersigwald rainersigwald merged commit b835f79 into dotnet:vs17.6 Mar 30, 2023
@dfederm dfederm deleted the sln-supersedes-dynamic-platform-resolution branch March 30, 2023 23:25
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.

4 participants