> It seems a bit arbitrary to pull out one of the files in the folder as a File just to nest the IISVirtualDir
The reason for this are rather historical. The base code model that was used as a starting point was following a canonical ASL.NET deployment scenarion where VirtDir is a associated with the directory with at least a single file. Thus this file and its component/feature was used as a logical container for the virtual dir.
However you are right and strictly speaking VirtDir should be associated with the directory rather directly but not through the file.
I have updated the code and no the constructor takes the VirtDir
Please test the NuGet package (v.1.0.34.2) with the changes.
The reason for this are rather historical. The base code model that was used as a starting point was following a canonical ASL.NET deployment scenarion where VirtDir is a associated with the directory with at least a single file. Thus this file and its component/feature was used as a logical container for the virtual dir.
However you are right and strictly speaking VirtDir should be associated with the directory rather directly but not through the file.
I have updated the code and no the constructor takes the VirtDir
new Dir("MyWebApp", new IISVirtualDir { Alias = "MyWebApp2", AppName = "Test2", WebSite = new WebSite("My Web Site", "*:80") { InstallWebSite = true } },