예제 #1
0
        protected ApplicationDeployer CreateDeployer(IISDeploymentParameters parameters)
        {
            if (parameters.ServerType == ServerType.IISExpress &&
                !parameters.EnvironmentVariables.ContainsKey(DebugEnvironmentVariable))
            {
                parameters.EnvironmentVariables[DebugEnvironmentVariable] = "console";
            }

            return(IISApplicationDeployerFactory.Create(parameters, LoggerFactory));
        }
예제 #2
0
        protected virtual async Task <IISDeploymentResult> DeployAsync(IISDeploymentParameters parameters)
        {
            if (!parameters.EnvironmentVariables.ContainsKey(DebugEnvironmentVariable))
            {
                parameters.EnvironmentVariables[DebugEnvironmentVariable] = "4";
            }

            if (parameters.ServerType == ServerType.IISExpress)
            {
                parameters.ServerConfigTemplateContent = parameters.ServerConfigTemplateContent ?? File.ReadAllText("IISExpress.config");
            }


            _deployer = IISApplicationDeployerFactory.Create(parameters, LoggerFactory);

            return((IISDeploymentResult)await _deployer.DeployAsync());
        }
예제 #3
0
        protected ApplicationDeployer CreateDeployer(IISDeploymentParameters parameters)
        {
            if (!parameters.EnvironmentVariables.ContainsKey(DebugEnvironmentVariable))
            {
                parameters.EnvironmentVariables[DebugEnvironmentVariable] = "console";
            }

            if (parameters.ServerType == ServerType.IISExpress)
            {
                parameters.ServerConfigTemplateContent = parameters.ServerConfigTemplateContent ?? File.ReadAllText("IISExpress.config");
            }

            if (parameters.ApplicationPublisher == null)
            {
                throw new InvalidOperationException("All tests should use ApplicationPublisher");
            }

            return(IISApplicationDeployerFactory.Create(parameters, LoggerFactory));
        }