Fix Microsoft.DotNet.ILCompiler cross compile package.

Remove unused IsFileClosed method.
This commit is contained in:
Fabian
2023-05-21 00:31:40 +00:00
parent d1ea1cfda9
commit 318b1a0bbf
2 changed files with 1 additions and 14 deletions

View File

@@ -72,7 +72,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="runtime.win-x64.Microsoft.DotNet.ILCompiler" Version="7.0.0" />
<PackageReference Include="runtime.win-x64.Microsoft.DotNet.ILCompiler" Version="7.*" />
<PackageReference Include="System.CommandLine" Version="2.0.0-*" />
</ItemGroup>
</Project>

View File

@@ -41,17 +41,4 @@ static class Helpers
Console.WriteLine();
Console.WriteLine($"Operating System: {RuntimeInformation.OSDescription}");
}
public static bool IsFileClosed(string filename)
{
try
{
using (var inputStream = File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.None))
return false;
}
catch (Exception)
{
return true;
}
}
}