예제 #1
0
        private void CopyHostToContainer(IContainerDirectory directory)
        {
            fileSystem.CopyFile(
                dependencyHelper.ContainerHostExePath,
                directory.MapBinPath(dependencyHelper.ContainerHostExe));

            // This check is here for the acceptance tests.
            // They get ContainerHost.exe by referencing the project.  However, msbuild does
            // not copy .config files of referenced assemblies.  Thus when running the acceptance
            // tests, the ContainerHost.exe used does not have an app.config.
            if (fileSystem.FileExists(dependencyHelper.ContainerHostExeConfigPath))
            {
                fileSystem.CopyFile(
                    dependencyHelper.ContainerHostExeConfigPath,
                    directory.MapBinPath(dependencyHelper.ContainerHostExeConfig));
            }

            foreach (var dependencyFilePath in dependencyHelper.GetContainerHostDependencies())
            {
                var targetFilePath = directory.MapBinPath(Path.GetFileName(dependencyFilePath));
                fileSystem.CopyFile(dependencyFilePath, targetFilePath);
            }
        }