[wix-users] Deployment Tools Foundation Documentation: Working with Install Packages

Costanzo Ferraro c.ferraro at list-group.com
Wed Jan 31 02:18:22 PST 2018


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,



More information about the wix-users mailing list