Going back to my project, NewSite3 gets installed in IIS along with Application Pool MyWebApp3, NewSite2 and MyWebApp2 do not.
, new Dir(@"AdminWeb2\"
, new IISVirtualDir
{
Name = "MyWebApp2",
AppName = "Test2",
WebSite = new WebSite("NewSite2", "*:8082") { InstallWebSite = true },
WebAppPool = new WebAppPool("MyWebApp2", "Identity=applicationPoolIdentity")
}
, new Files(featAdminWeb, @"..\SetupIPAV\AdminWebSitePublish\*.*")
)
, new Dir(@"AdminWeb3\"
, new File(featAdminWeb, @"..\SetupIPAV\AdminWebSitePublish\Global.asax"
, new IISVirtualDir
{
Name = "MyWebApp3",
AppName = "Test3",
WebSite = new WebSite("NewSite3", "*:8082") { InstallWebSite = true },
WebAppPool = new WebAppPool("MyWebApp3", "Identity=applicationPoolIdentity")
}
)
, new Files(featAdminWeb, @"..\SetupIPAV\AdminWebSitePublish\*.*", s => !s.EndsWith("Global.asax"))
)
I also tried modifying the sample code to look more like my project but could not get it to fail://css_dir ..\..\..\;
//css_ref WixSharp.dll;
//css_ref Wix_bin\SDK\Microsoft.Deployment.WindowsInstaller.dll;
//css_ref System.Core.dll;
using System;
using System.Xml;
using System.Xml.Linq;
using System.Linq;
using WixSharp;
using WixSharp.CommonTasks;
class Script
{
static public void Main(string[] args)
{
var myWebSite = new WebSite("My Web Site", "*:80")
{
//to be created instead of existing one to be reused
InstallWebSite = true
};
var myFeature = new Feature("MYFEATURE", true);
var project =
new Project("My Product",
new Dir(@"%ProgramFiles%\MyCompany",
new Dir(@"MyWebApp"
, new IISVirtualDir
{
Name = "MyWebApp",
AppName = "Test",
WebSite = new WebSite("NewSite", "*:8080") { InstallWebSite = true },
WebAppPool = new WebAppPool("MyWebApp", "Identity=applicationPoolIdentity")
},
/*
new IISVirtualDir
{
Alias = "MyWebApp2",
AppName = "Test2",
WebSite = new WebSite("My Web Site 2", "*:80") { InstallWebSite = true }
},
*/
new Files(myFeature, @"MyWebApp\*.*")
)
)
);
project.GUID = new Guid("6fe30b47-2577-43ad-9095-1861ba25889b");
project.UI = WUI.WixUI_ProgressOnly;
project.OutFileName = "setup";
project.PreserveTempFiles = true;
project.BuildMsi();
}
}