internal void Validate()

in ILRepack/RepackOptions.cs [248:270]


        internal void Validate()
        {
            if (DelaySign && KeyFile == null && KeyContainer == null)
                throw new InvalidOperationException("Option 'delaysign' is only valid with 'keyfile' or 'keycontainer'.");

            if (AllowMultipleAssemblyLevelAttributes && !CopyAttributes)
                throw new InvalidOperationException("Option 'allowMultiple' is only valid with 'copyattrs'.");

            if (!string.IsNullOrEmpty(AttributeFile) && CopyAttributes)
                throw new InvalidOperationException("Option 'attr' can not be used with 'copyattrs'.");

            if (RenameInternalized && !Internalize)
                throw new InvalidOperationException("Option 'renameInternalized' is only valid with 'internalize'.");
            
            if (string.IsNullOrEmpty(OutputFile))
                throw new ArgumentException("No output file given.");

            if (InputAssemblies == null || InputAssemblies.Length == 0)
                throw new ArgumentException("No input files given.");

            if ((KeyFile != null) && !file.Exists(KeyFile))
                throw new ArgumentException($"KeyFile does not exist: '{KeyFile}'.");
        }