Skip to content

Allow SDK Version in explicit project imports - #2895

Merged
AndyGerlicher merged 1 commit into
dotnet:vs15.6from
AndyGerlicher:sdkversionfix
Jan 24, 2018
Merged

AndyGerlicher merged 1 commit into
dotnet:vs15.6from
AndyGerlicher:sdkversionfix

Conversation

@AndyGerlicher

Copy link
Copy Markdown
Contributor

All the code was here but the attribute was not allowed on the Import
element at project parse time for Version or MinimumVersion. This change
allows those attributes and rest of the code worked as expected. Added
tests for the scenario and a few others.

All the code was here but the attribute was not allowed on the Import
element at project parse time for Version or MinimumVersion. This change
allows those attributes and rest of the code worked as expected. Added
tests for the scenario and a few others.

private SdkReference GetParsedSdk(ProjectImportElement element)
{
PropertyInfo parsedSdkInfo = typeof(ProjectImportElement).GetProperty("ParsedSdkReference", BindingFlags.Instance | BindingFlags.NonPublic);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isn't the point of this test assembly to not have to depend on internals?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, but for verification I thought this was cleaner than anything else. I was concerned mainly with parsing, and using this allows me to assert that the data going to the resolver from the evaluator is exactly what was intended. It might mean there's not enough disambiguation in the OM since I think some of the internals have changed since it was originally exposed. But not something that I wanted to change at this point.

@AndyGerlicher

Copy link
Copy Markdown
Contributor Author

@dotnet-bot test Ubuntu14.04 Build for CoreCLR please

1 similar comment
@AndyGerlicher

Copy link
Copy Markdown
Contributor Author

@dotnet-bot test Ubuntu14.04 Build for CoreCLR please

@AndyGerlicher
AndyGerlicher merged commit 4a0dc68 into dotnet:vs15.6 Jan 24, 2018
radical pushed a commit to radical/msbuild that referenced this pull request Jan 30, 2018
All the code was here but the attribute was not allowed on the Import
element at project parse time for Version or MinimumVersion. This change
allows those attributes and rest of the code worked as expected. Added
tests for the scenario and a few others.
@AndyGerlicher
AndyGerlicher deleted the sdkversionfix branch June 26, 2018 20:36
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