Convert 'Init' to MSBuild.
This commit is contained in:
parent
219d9d269c
commit
038758acf4
11 changed files with 360 additions and 344 deletions
|
@ -0,0 +1,27 @@
|
|||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
using Microsoft.DotNet.InternalAbstractions;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class GetCurrentRuntimeInformation : Task
|
||||
{
|
||||
[Output]
|
||||
public string Rid { get; set; }
|
||||
|
||||
[Output]
|
||||
public string Architecture { get; set; }
|
||||
|
||||
[Output]
|
||||
public string OSName { get; set; }
|
||||
|
||||
public override bool Execute()
|
||||
{
|
||||
Rid = RuntimeEnvironment.GetRuntimeIdentifier();
|
||||
Architecture = RuntimeEnvironment.RuntimeArchitecture;
|
||||
OSName = Monikers.GetOSShortName();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue