Skip to content

Conversation

sfoslund
Copy link
Member

@sfoslund sfoslund commented May 19, 2020

Fixes #11369

@sfoslund sfoslund requested a review from dsplaisted May 20, 2020 15:09
{
public RequiresMSBuildVersionFactAttribute(string version)
{
if (!Version.TryParse(TestContext.Current.ToolsetUnderTest.MSBuildVersion, out Version msbuildVersion))
Copy link
Member

Choose a reason for hiding this comment

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

I think these attributes should never skip if running on .NET Core (if we don't have the required MSBuild version in the .NET SDK, then we wouldn't be writing the test at all). If running on full framework, then we need to shell out to msbuild instead of dotnet msbuild to get the full framework MSBuild version. Also, make sure that we handle 3 versus 4 part version numbers correctly (where the required version is 3 parts and the msbuild version is 4 parts).

@dsplaisted dsplaisted merged commit f46d35e into dotnet:master May 27, 2020
@sfoslund sfoslund deleted the MSbuildTesting branch May 27, 2020 21:48
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.

Better handle tests which require new MSBuild features

2 participants