Hi Oleg!
I created the project to generate the msi package on wixsharp.
With it project, I created 2 installation packages of different versions
Both generated MSI files have one UpdateCode, but different ProductId and versions.
Almost the same set of files, the only difference is in the contents of some files.
Files are added to the project through a wildcard mask, as there are quite a few of them, more than 300 pcs.
Project project = new Project(Constants.AppName,
new Dir(@"[INSTALLDIR]",
new Files(@"Files\Bin\*.*", p => !p.EndsWith("MyService.exe", StringComparison.OrdinalIgnoreCase)),
new File(@"Files\Bin\MyService.exe")
{
ServiceInstaller = new ServiceInstaller()
{
Name = "MyService",
DisplayName = Constants.AppName,
StopOn = SvcEvent.InstallUninstall_Wait,
RemoveOn = SvcEvent.Uninstall_Wait,
Account = "[SVC_USER]",
Password = "[SVC_PASSWORD]",
StartType = SvcStartType.auto,
Arguments = "--service"
}
}))
Some project parameters:
EmitConsistentPackageId = true,
MajorUpgrade = new MajorUpgrade
{
AllowDowngrades = false,
AllowSameVersionUpgrades = true,
IgnoreRemoveFailure = false,
DowngradeErrorMessage = "A later version of [ProductName] is already installed. Setup will now exit.",
},
Problem sequence of actions.:
Install first package (younger version), everything is installed and working.
Install second package (update). During installation, the old version is removed and the new version is installed. But after this operation, several files are missing in the install folder.
If you install second package to clear system (with out update), the missing files will be in place.
In the repository (msi) file, these files are also present. How is this possible?
Any ideas?
-- Русская версия
Олег добрый день! Возникла проблема следующего характера:
Есть проект генерации MSI пакета с помощью WixSharp'а.
И 2 пакета установки полученные из этого проекта.
Оба сгенерированных MSI файла имеют один UpdateCode, разные ProductId и версии. Практически один и тот же набор файлов, разница только в содержимом некоторых файлов.
Файлы добавляются в проект через wildcard маску, так как их довольно много, более 300 шт.
Project project = new Project(Constants.AppName,
new Dir(@"[INSTALLDIR]",
new Files(@"Files\Bin\*.*", p => !p.EndsWith("MyService.exe", StringComparison.OrdinalIgnoreCase)),
new File(@"Files\Bin\MyService.exe")
{
ServiceInstaller = new ServiceInstaller()
{
Name = "MyService",
DisplayName = Constants.AppName,
StopOn = SvcEvent.InstallUninstall_Wait,
RemoveOn = SvcEvent.Uninstall_Wait,
Account = "[SVC_USER]",
Password = "[SVC_PASSWORD]",
StartType = SvcStartType.auto,
Arguments = "--service"
}
}))
Параметры проекта такие:
EmitConsistentPackageId = true,
MajorUpgrade = new MajorUpgrade
{
AllowDowngrades = false,
AllowSameVersionUpgrades = true,
IgnoreRemoveFailure = false,
DowngradeErrorMessage = "A later version of [ProductName] is already installed. Setup will now exit.",
},
Устанавливаем 1 пакет (младшей версии), всё устанавливается и работает.
Устанавливаем 2 пакет (поверх первого). Во время установки удаляется старая версия и устанавливается новая. Но после этой операции в папке не хватает нескольких файлов.
При этом, если установить 2 пакет с нуля, файлы будут на месте. В репозитории (msi) файле эти файлы так же присутствуют. Как такое возможно?
Никаких условий установки для потерянных файлов нет.
Есть какие то идеи, почему при установке эти файлы не попадают в папку установки?
В лог файлах о возможных причинах отсутствия этих файлов нет не единой строки, хотя я включил максимальный уровень логирования.
Заранее спасибо.
Есть ли в логах строки такого типа:
Disallowing installation of component: {GUID} since the same component with higher versioned keyfile exists
@Xaddan might be very right. If it is there then it can be a result of the component IDs not being globally unique.
This problem is addressed in the Release v1.9.1. What version are you using?
Thank you Xaddin and Oleg! I found the problem.
The missing files did not have a file version and it was 0.0.0.0.
My comrade added AssemblyInfo.cs to projects, everything worked fine.
Всем спасибо за ответы! Проблема была в том, что у файлов потеряшек версия была 0.0.0.0, так как товарищ забыл добавить в них AssemblyInfo :D
Спасибо вам еще раз, за то, что вы всегда помогаете!