public IISTestSiteFixture() { var logging = AssemblyTestLog.ForAssembly(typeof(IISTestSiteFixture).Assembly); var deploymentParameters = new IISDeploymentParameters(Helpers.GetInProcessTestSitesPath(), DeployerSelector.ServerType, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64) { TargetFramework = Tfm.NetCoreApp22, AncmVersion = AncmVersion.AspNetCoreModuleV2, HostingModel = HostingModel.InProcess, PublishApplicationBeforeDeployment = true, }; _forwardingProvider = new ForwardingProvider(); var loggerFactory = logging.CreateLoggerFactory(null, nameof(IISTestSiteFixture)); loggerFactory.AddProvider(_forwardingProvider); _deployer = IISApplicationDeployerFactory.Create(deploymentParameters, loggerFactory); DeploymentResult = _deployer.DeployAsync().Result; Client = DeploymentResult.HttpClient; BaseUri = DeploymentResult.ApplicationBaseUri; ShutdownToken = DeploymentResult.HostShutdownToken; }
public IISTestSiteFixture(Action <IISDeploymentParameters> configure) { var logging = AssemblyTestLog.ForAssembly(typeof(IISTestSiteFixture).Assembly); _loggerFactory = logging.CreateLoggerFactory(null, nameof(IISTestSiteFixture)); _forwardingProvider = new ForwardingProvider(); _loggerFactory.AddProvider(_forwardingProvider); _configure = configure; }
internal IISTestSiteFixture(Action <IISDeploymentParameters> configure) { var logging = AssemblyTestLog.ForAssembly(typeof(IISTestSiteFixture).Assembly); _loggerFactory = logging.CreateLoggerFactory(null, nameof(IISTestSiteFixture)); _forwardingProvider = new ForwardingProvider(); _loggerFactory.AddProvider(_forwardingProvider); _configure = configure; DeploymentParameters = new IISDeploymentParameters() { RuntimeArchitecture = RuntimeArchitecture.x64, RuntimeFlavor = RuntimeFlavor.CoreClr, TargetFramework = Tfm.Default, HostingModel = HostingModel.InProcess, PublishApplicationBeforeDeployment = true, ApplicationPublisher = new PublishedApplicationPublisher(Helpers.GetInProcessTestSitesName()), ServerType = DeployerSelector.ServerType }; }