Make sure netstandard.dll is found, and don't download in test mode
This commit is contained in:
Родитель
ae4cacb6ba
Коммит
99ba4b3568
|
@ -37,6 +37,7 @@ steps:
|
||||||
- download: winsdk
|
- download: winsdk
|
||||||
displayName: Download pipeline NuGet packages
|
displayName: Download pipeline NuGet packages
|
||||||
artifact: NuGetPackages
|
artifact: NuGetPackages
|
||||||
|
condition: eq(variables.UsePreGeneratedSource, false)
|
||||||
|
|
||||||
- task: UseDotNet@2
|
- task: UseDotNet@2
|
||||||
displayName: Use DotNet 3.x
|
displayName: Use DotNet 3.x
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace ClangSharpSourceToWinmd
|
||||||
return Path.Combine(progFiles, @"dotnet\packs\NETStandard.Library.Ref\2.1.0\ref\netstandard2.1\netstandard.dll");
|
return Path.Combine(progFiles, @"dotnet\packs\NETStandard.Library.Ref\2.1.0\ref\netstandard2.1\netstandard.dll");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Main(string[] args)
|
static int Main(string[] args)
|
||||||
{
|
{
|
||||||
string sourceDirectory = args[0];
|
string sourceDirectory = args[0];
|
||||||
string interopFileName = args[1];
|
string interopFileName = args[1];
|
||||||
|
@ -30,6 +30,11 @@ namespace ClangSharpSourceToWinmd
|
||||||
}
|
}
|
||||||
|
|
||||||
var netstandardPath = FindNetstandardDllPath();
|
var netstandardPath = FindNetstandardDllPath();
|
||||||
|
if (!File.Exists(netstandardPath))
|
||||||
|
{
|
||||||
|
Console.WriteLine($"Error: Failed to find {netstandardPath}.");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
List<MetadataReference> refs = new List<MetadataReference>();
|
List<MetadataReference> refs = new List<MetadataReference>();
|
||||||
refs.Add(MetadataReference.CreateFromFile(interopFileName));
|
refs.Add(MetadataReference.CreateFromFile(interopFileName));
|
||||||
|
@ -54,6 +59,8 @@ namespace ClangSharpSourceToWinmd
|
||||||
|
|
||||||
Console.WriteLine($"Emitting {outputFileName}...");
|
Console.WriteLine($"Emitting {outputFileName}...");
|
||||||
ClangSharpSourceWinmdGenerator.GenerateWindmdForCompilation(comp, assemblyVersion, outputFileName);
|
ClangSharpSourceWinmdGenerator.GenerateWindmdForCompilation(comp, assemblyVersion, outputFileName);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче