Example #1
0
        private void writeZipFile(CreatePackageInput input, PackageManifest manifest, AssemblyFiles assemblies)
        {
            _zipFileService.CreateZipFile(input.ZipFile, zipFile =>
            {
                assemblies.Files.Each(file =>
                {
                    zipFile.AddFile(file, "bin");
                });

                if (input.PdbFlag)
                {
                    assemblies.PdbFiles.Each(file =>
                    {
                        zipFile.AddFile(file, "bin");
                    });
                }

                WriteVersion(zipFile);

                zipFile.AddFile(FileSystem.Combine(input.PackageFolder, PackageManifest.FILE), "");

                AddDataFiles(input, zipFile, manifest);

                AddContentFiles(input, zipFile, manifest);
            });
        }
Example #2
0
 public void WriteAssembliesNotFound(AssemblyFiles theAssemblyFiles, PackageManifest manifest, CreatePackageInput input)
 {
     Console.WriteLine("Did not locate all designated assemblies at {0}", input.PackageFolder);
     Console.WriteLine("Looking for these assemblies in the package manifest file:");
     manifest.AssemblyNames.Each(name => Console.WriteLine("  " + name));
     Console.WriteLine("But only found");
     theAssemblyFiles.Files.Each(file => Console.WriteLine("  " + file));
 }
        public AssemblyFiles FindAssemblies(string binDirectory, IEnumerable<string> assemblyNames)
        {
            var assemblySet = FileSet.ForAssemblyNames(assemblyNames);
            var debugSet = FileSet.ForAssemblyDebugFiles(assemblyNames);

            var files = new AssemblyFiles(){
                Files = _fileSystem.FindFiles(binDirectory, assemblySet),
                PdbFiles = _fileSystem.FindFiles(binDirectory, debugSet)
            };

            var assembliesFound = files.Files.Select(Path.GetFileNameWithoutExtension).Select(x => x.ToLowerInvariant());
            files.MissingAssemblies = assemblyNames.Select(x => x.ToLowerInvariant()).Where(name => !assembliesFound.Contains(name));
            files.Success = !files.MissingAssemblies.Any();

            return files;
        }
Example #4
0
        public AssemblyFiles FindAssemblies(string binDirectory, IEnumerable <string> assemblyNames)
        {
            var assemblySet = FileSet.ForAssemblyNames(assemblyNames);
            var debugSet    = FileSet.ForAssemblyDebugFiles(assemblyNames);

            var files = new AssemblyFiles()
            {
                Files    = _fileSystem.FindFiles(binDirectory, assemblySet),
                PdbFiles = _fileSystem.FindFiles(binDirectory, debugSet)
            };

            var assembliesFound = files.Files.Select(Path.GetFileNameWithoutExtension).Select(x => x.ToLowerInvariant());

            files.MissingAssemblies = assemblyNames.Select(x => x.ToLowerInvariant()).Where(name => !assembliesFound.Contains(name));
            files.Success           = !files.MissingAssemblies.Any();

            return(files);
        }
Example #5
0
        private void writeZipFile(CreatePackageInput input, PackageManifest manifest, AssemblyFiles assemblies)
        {
            _zipFileService.CreateZipFile(input.ZipFile, zipFile =>
            {
                assemblies.Files.Each(file =>
                {
                    zipFile.AddFile(file, "bin");
                });

                if (input.PdbFlag)
                {
                    assemblies.PdbFiles.Each(file =>
                    {
                        zipFile.AddFile(file, "bin");
                    });
                }

                WriteVersion(zipFile);

                zipFile.AddFile(FileSystem.Combine(input.PackageFolder, PackageManifest.FILE), "");

                AddDataFiles(input, zipFile, manifest);

                AddContentFiles(input, zipFile, manifest);
            });
        }