Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle ExePackage 'Cache' parameter #1675

Closed
marcopornic opened this issue Nov 20, 2024 · 1 comment
Closed

Bundle ExePackage 'Cache' parameter #1675

marcopornic opened this issue Nov 20, 2024 · 1 comment

Comments

@marcopornic
Copy link

Hello,

I'm trying to remove Cache for an ExePackage of a bundle:

`
new ExePackage(@".\cm\CM.exe")

     {
        Name = "CMRuntime",
        InstallArguments = "/i /ComponentArgs \"*\":\"/qn ADDLOCAL=Complete,EnableNetworkServer\"",
        DetectCondition = $"cmVersionInstalled = {cmVersionToInstall}",
        Compressed = true,
        Permanent = true,
        Cache = false,
        Vital = true
    }

`

The 'false' value is interpreted as a "no" String for KeepRemoveForceType type (https://wixtoolset.org/docs/schema/wxs/keepremoveforcetype/)

When I try to generate the bundle, have the following error:

error WIX0021: The ExePackage/@Cache attribute's value, 'no', is not on e of the legal options: 'force,keep,remove'.

Thanks for your help !

@oleg-shilo
Copy link
Owner

Thank you for reporting. The problem is caused by the changes in the WiX4 API. Now the cache field is no longer boolean.
I have fixed the problem and from the next release you will be able to set the field like this: Cache = PackageCacheAction.remove

But until the release is available please use this workaround:

new ExePackage(msi_exe)
{
    Name = "ManagedProduct",
    InstallArguments = "/i",
    UninstallArguments = "/x",
    AttributesDefinition = "Cache=remove",
    . . .

oleg-shilo added a commit that referenced this issue Dec 3, 2024
- #1673: Error on using template "WixSharp Managed Setup - Custom Dialog (Wix 3)"
- #1675: Bundle ExePackage 'Cache' parameter
- Added prevention of the WiX5 tools for the Custom BA bootstrapper template. Downgrading it to WiX4 tools.
- Issue #1667: AddDefaultNamespaces removing processing instructions
- Updated skip dialog example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants