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

[Xamarin.Android.Build.Tests] Find the Microsoft.NET.Sdk #2307

Merged
merged 1 commit into from
Oct 17, 2018

Conversation

dellis1972
Copy link
Contributor

We don't always install the 2.0.0 version of the .net SDK
on Mac. So we should detect and use the most recent version.
This will mean that the NetStandardReferenceTest might
actually start running again.

if (File.Exists (Path.Combine (path, "Sdk", "Sdk.props")))
return path;
path = System.IO.Path.Combine ("/usr", "local", "share", "dotnet", "sdk");
var dirs = Directory.GetDirectories (path, "*.*.*").OrderByDescending (x => x);
Copy link
Member

Choose a reason for hiding this comment

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

I have written code similar to this for xabuild, maybe could reuse it? https://github.com/xamarin/xamarin-android/blob/b78dd8bf4b1656ade4f9a46de767975400bc0101/tools/xabuild/XABuildPaths.cs#L227-L245

This looks like the code in this PR would order alphabetical, I think I was seeing that putting things in the wrong order when I wrote the above for xabuild. I think checking for Sdk.props, is probably a good idea, though.

We don't always install the `2.0.0` version of the .net SDK
on Mac. So we should detect and use the most recent version.
This will mean that the `NetStandardReferenceTest` might
actually start running again.
@jonpryor jonpryor merged commit b61941e into dotnet:master Oct 17, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants