[wix-users] Deployment Tools Foundation Documentation: Working with Install Packages
Joseph L. Casale
jcasale at activenetwerx.com
Wed Jan 31 07:43:22 PST 2018
This is not even valid code, the path in your using directive is an error.
You also don’t provide the type that 'files' is, it looks like a dictionary and if so, what is the value type, object? Cast to a string?
Hard to help here without all the actual code...
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
> Of Costanzo Ferraro via wix-users
> Sent: Wednesday, January 31, 2018 3:18 AM
> To: wix-users at lists.wixtoolset.org
> Cc: Costanzo Ferraro <c.ferraro at list-group.com>
> Subject: [wix-users] Deployment Tools Foundation Documentation: Working
> with Install Packages
>
> Dear List,
>
> I would like to update some files in a Product layout. I tried to run
> the example posted on DTF Documentation
>
>
> using (InstallPackage pkg = new InstallPackage("d:\builds\product.msi",
> DatabaseOpenMode.Transact))
>
> {
> pkg.WorkingDirectory = Path.Combine(Path.GetTempFolder(),
> "pkgtmp");
> foreach (string fileKey in files.Keys)
>
> {
> string sourceFilePath = files[fileKey];
> string destFilePath = pkg.Files[fileKey].SourcePath;
> destFilePath = Path.Combine(pkg.WorkingDirectory,
> destFilePath);
> File.Copy(sourceFilePath, destFilePath, true);
>
> }
> pkg.UpdateFiles(new ArrayList(files.Keys));
>
> pkg.Commit();
> Directory.Delete(pkg.WorkingDirectory, true);
>
> }
>
> but compiler signaled type mismatch error to these lines:
>
>
> string sourceFilePath = files[fileKey];
>
> pkg.UpdateFiles(new ArrayList(files.Keys));
>
>
> How can I fix them?
>
> Regards,
>
>
> __________________________________________________________
> __________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
More information about the wix-users
mailing list