Convert 'Init' to MSBuild.
This commit is contained in:
parent
219d9d269c
commit
038758acf4
11 changed files with 360 additions and 344 deletions
22
build_projects/dotnet-cli-build/SetEnvVar.cs
Normal file
22
build_projects/dotnet-cli-build/SetEnvVar.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class SetEnvVar : Task
|
||||
{
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Value { get; set; }
|
||||
|
||||
public override bool Execute()
|
||||
{
|
||||
Environment.SetEnvironmentVariable(Name, Value);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue