private InstallHeader CreateInstall(ApplicationManagementClient proxy, Application app)
{
using (var fileStream = new FileStream(InstallFilePath, FileMode.Open, FileAccess.Read, FileShare.Read))
{
var install = new NewInstall
{
ApplicationId = app.ApplicationId,
CreatedByUserName = Environment.UserName,
Version = Version,
InstallFileName = Path.GetFileName(InstallFilePath),
InstallCommandLine = InstallCommandLine,
ShouldRemovePreviousVersion = ShouldRemovePreviousVersion
};
var i = proxy.CreateInstall(install, fileStream);
LogMessage(MessageImportance.Low, String.Format("Created new install id = {0}", i.InstallId));
return i;
}
}