// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem;
usingSystem.Collections.Generic;
usingSystem.IO;
usingSystem.Runtime.InteropServices;
usingSystem.Reflection.Metadata;
usingSystem.Reflection.PortableExecutable;
namespaceConsoleApplication3
namespaceFakeSign
{
/// <summary>
/// Takes a delay-signed assembly and flips its CLI header "strong-name signed" bit without
...
...
@@ -34,13 +32,25 @@ internal static class Program
privatestaticboolExecuteCore(stringassemblyPath)
{
if(Directory.Exists(assemblyPath))
{
Console.Error.WriteLine($"Expected file, not a directory: {assemblyPath}");
returnfalse;
}
if(!File.Exists(assemblyPath))
{
Console.Error.WriteLine($"File not found: {assemblyPath}");