31 lines
905 B
Plaintext
31 lines
905 B
Plaintext
@{/*
|
|
|
|
dotnet
|
|
Run dotnet commands in your project. Executes `dotnet` command.
|
|
|
|
command=''
|
|
The `dotnet` subcommand to execute.
|
|
dotnetDir=''
|
|
Optional. The directory in which to execute the `dotnet` command.
|
|
*/}
|
|
|
|
@{
|
|
//temporary delete cross-gen files
|
|
var installDir = Environment.GetEnvironmentVariable("DOTNET_INSTALL_DIR");
|
|
if (string.IsNullOrEmpty(installDir))
|
|
{
|
|
installDir = Path.Combine(Environment.GetEnvironmentVariable("LocalAppData"), "Microsoft", "dotnet", "cli");
|
|
}
|
|
|
|
var files = Directory.GetFiles(installDir, "*.ni.*", SearchOption.AllDirectories);
|
|
foreach (var file in files.Where(f => !f.Contains("mscorlib")))
|
|
{
|
|
Console.WriteLine("Deleting {0}", file);
|
|
File.Delete(file);
|
|
}
|
|
}
|
|
|
|
default currentDir = '${Directory.GetCurrentDirectory()}'
|
|
default dotnetDir = '${ currentDir }'
|
|
|
|
exec program='dotnet' commandline='${command}' workingdir='${dotnetDir}' |