Skip to content

Instantly share code, notes, and snippets.

@jpobst
Created October 12, 2021 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpobst/1c33c6923c0f9028c8b38d587b7a439c to your computer and use it in GitHub Desktop.
Save jpobst/1c33c6923c0f9028c8b38d587b7a439c to your computer and use it in GitHub Desktop.
if (Environment.Version.Major > 5) {
var apiCompat = new FileInfo (Path.Combine (ApiCompatPath, "Microsoft.DotNet.ApiCompat.dll"));
genApiProcess.StartInfo.FileName = "dotnet";
genApiProcess.StartInfo.Arguments = $"\"{apiCompat}\" ";
} else {
var apiCompat = new FileInfo (Path.Combine (ApiCompatPath, "Microsoft.DotNet.ApiCompat.exe"));
genApiProcess.StartInfo.FileName = apiCompat.FullName;
}
genApiProcess.StartInfo.Arguments += $"\"{contractAssembly.FullName}\" -i \"{TargetImplementationPath}\" --allow-default-interface-methods ";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment