[wix-users] Failed to resolve source for file: error

Kiran k.g me.kirankg at gmail.com
Fri Feb 16 02:02:13 PST 2018


I got the event working. When the error occurs the resolvesource event is
triggred but how to provide the path of the source. My actual source file
used to install is already deleted from location. If the original source
file was available this issue is not seen.

On Fri, Feb 16, 2018 at 2:00 PM, Kiran k.g <me.kirankg at gmail.com> wrote:

> Thank you for your reply. I saw the following code from
> https://github.com/wixtoolset/issues/issues/5586
>
> private void OnResolveSource(object sender, ResolveSourceEventArgs e)
> {
>     var wixBundleOriginalSource = Application.Engine.StringVariables["WixBundleOriginalSource"];
>
>     Application.Engine.Log(LogLevel.Verbose, $"Setting local source for {e.PackageOrContainerId} to '{wixBundleOriginalSource}' (WixBundleOriginalSource)");
>     Application.Engine.SetLocalSource(e.PackageOrContainerId, e.PayloadId, wixBundleOriginalSource);
>
>     Application.Engine.Log(LogLevel.Verbose, $"Retry to resolve source for {e.PackageOrContainerId}");
>     e.Result = Result.Retry;
> }
>
> Are you suggesting me to add the OnResolveSource event. I tried adding and this code is not executed, event is not fired. what you mean by handle prompt for source, since i dont have the source. After upgrade the source file is deleted. If the source file is available at the original location there is no issue. Please advice.
>
>
>
> On Fri, Feb 16, 2018 at 12:34 PM, Rob Mensching <rob at firegiant.com> wrote:
>
>> Your BA needs to handle the prompt for source.
>>
>> Also, make sure you use DetectCondition not InstallCondition to "skip the
>> installation of A".
>> _____________________________________________________________
>>  Short replies here. Complete answers over there:
>> http://www.firegiant.com/
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
>> Behalf Of Kiran k.g via wix-users
>> Sent: Thursday, February 15, 2018 10:27 PM
>> To: wix-users at lists.wixtoolset.org
>> Cc: Kiran k.g <me.kirankg at gmail.com>
>> Subject: [wix-users] Failed to resolve source for file: error
>>
>> I have a bundled application say XYZ-1.0.0.1.exe, with applications
>> A-2.2.0.1.exe and B-1.2.0.1.exe bundled in it. So when we install XYZ, we
>> get A and B as well listed in Add Remove Programs. But when I upgrade
>> XYZ-1.0.0.1 with XYZ-1.0.0.2, which has A-2.2.0.1.exe and B-1.2.0.2.exe,
>> so that A is same and already installed and B needs upgrade. I actually
>> skipped the installation of A by making the install condition false, since
>> the same version is already installed and installed only B while upgrading.
>>
>> After successfully upgrading I am not able to uninstall the application
>> XYZ, it says some package error, also this happens only if the source file
>> used for upgrading is removed from machine.Actually while uninstalling
>> package has to be referred from program cache, I think since we skipped A
>> package cache has problem.
>>
>> The error that i get is as follows "Prompt for source of container:
>> WixAttachedContainer, path: C:\Users\ABC\Desktop\XYZ-1.0.0.2.exe Failed
>> to resolve source for file: C:\Users\ABC\Desktop\XYZ-1.0.0.2.exe, error:
>> 0x80070002. Error 0x80070002: Failed while prompting for source (original
>> path 'C:\Users\ABC\Desktop\XYZ-1.0.0.2.exe'). Failed to acquire
>> container:
>> WixAttachedContainer to working path: C:\Users\ABC\AppData\Local\
>> Temp{b4a1c780-306c-40f0-83ad7}, error: 0x80070002. "
>>
>> This error occurs only when i copy XYZ.exe to any path say desktop and
>> after installation(skip installing A or B since same version of A or B
>> bundled is already installed) and delete the setup file XYZ.exe from saved
>> path ie here Desktop. I am not able to uninstall unless i uninstall A or B
>> which was skipped independently.
>>
>>
>>
>> Also there is another scenario.
>>
>> I have a bundled application say XYZ-1.0.0.1.exe, with applications
>> A-2.2.0.1.exe and B-1.2.0.1.exe bundled in it. XYZ-1.0.0.2.exe, which has
>> A-2.2.0.1.exe and B-1.2.0.2.exe. Thes in both versions of XYZ we have the
>> same version of A. When i install XYZ-1.0.0.1.exe i skipped the
>> installation of A-2.2.0.1.exe by setting the install condition to false. So
>> XYZ-1.0.0.1.exe is installed and B-1.2.0.1 is also installed. Further when
>> i upgraded to XYZ-1.0.0.2, I need to install all of the A and B.
>> Installation was successfull and now i have XYZ-1.0.0.2, A-2.2.0.1 and
>> B-1.2.0.2. Now if i delete the installation file of XYZ-1.0.0.2.exe from
>> original path and try to uninstall it breaks.
>>
>>
>> Initially i thought that the package cache issue arises since
>> A-2.2.0.1.exe was not installed along with XYZ-1.0.0.2.exe since i skipped
>> it as it is already available. But after the second scenario got to know
>> that skipping was not the issue. Since in second scenario A-2.2.0.1.exe was
>> installed along with XYZ-1.0.0.2.exe.
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant
>> http://www.firegiant.com/
>>
>
>


More information about the wix-users mailing list