2016-09-27 23:11:16 +00:00
|
|
|
using System.Linq;
|
|
|
|
using Microsoft.Build.Construction;
|
|
|
|
using Microsoft.DotNet.ProjectJsonMigration;
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Tools.Migrate
|
|
|
|
{
|
|
|
|
public static class ProjectRootElementExtensions
|
|
|
|
{
|
|
|
|
public static string GetSdkVersion(this ProjectRootElement projectRootElement)
|
|
|
|
{
|
2016-09-29 20:05:27 +00:00
|
|
|
//TODO: Temporarily pinning the SDK version for Migration. Once we have packageref migration we can remove this.
|
|
|
|
return "1.0.0-alpha-20160929-1";
|
|
|
|
|
|
|
|
// return projectRootElement
|
|
|
|
// .Items
|
|
|
|
// .Where(i => i.ItemType == "PackageReference")
|
|
|
|
// .First(i => i.Include == ConstantPackageNames.CSdkPackageName)
|
|
|
|
// .GetMetadataWithName("version").Value;
|
2016-09-27 23:11:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|