1

I get error messages related to my BootstrapperApplicationRef which I do not understand as these come from examples based on the well known wix book and also this example. Maybe it is because I use version 3.11 of the toolset (the book is based on 3.6)? My installer needs to install some software to download.

Here is my wxs:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle Name="Awesome Software"
Version="1.0.0.0"
Manufacturer="Awesome Company"
UpgradeCode="c352f5c7-1dbe-416c-820d-685b058270d5">
<BootstrapperApplicationRef
Id="WixStandardBootstrapperApplication.RtfLicense" />
  
<Chain>
  <ExePackage Id="DymoLabelSoftware"
       SourceFile="DLS8Setup.8.5.1.exe"
       DownloadUrl="http://download.dymo.com/dymo/Software/Win/DLS8Setup.8.5.1.exe" />
</Chain>

</Bundle>
</Wix>

Compiling results in the following error message:

Unresolved reference to symbol 'WixBootstrapperApplication:WixStandardBootstrapperApplication.RtfLicense'

Changing this element as described here, results in the following message:

Unresolved reference to symbol 'WixBootstrapperApplication:WixNetFxExtension'

Removing the BootstrapperApplicationRef results in another error message:

Unresolved reference to symbol 'WixBootstrapperApplication:WixNetFxExtension'

I can understand that something is unresolved but the found examples to resolve it simply do not work. How can I fix this? How to resolve this reference without getting an error message?

Update 1

I tried to make this work with a bootstrapper project instead. That partially solved my problem.

I just get another error message.

The system cannot find the file 'DLS8Setup.8.5.1.exe'.

This is really strange. The compiler should not try to find it at compile time. It is something to be downloaded at runtime. I tried making this work by adding a dummy DLS8Setup.8.5.1.exe.

However, when looking up my result in my bin\Debug folder, I get an application that, when double clicking, does not show a user interface. This approach does not really solve my problems, it changes my problem.

It just want to have an installer that shows some user interface when starting and does execute a download. That's all.

enter image description here

Update 2

Using the other example to download just give other errors too.

enter image description here

Daan
  • 2,478
  • 3
  • 36
  • 76
  • Just tried your sample - everything works. But I created it from VS template of wix 3.11 Bootstrapper. Have you tried to do it this way? – ba-a-aton Mar 31 '21 at 13:58
  • @ba-a-aton Can you give me a fully working example? I used a setup project instead of a bootstrapper project which explains my problem (so thanks for telling me ). However, when creating a Bootstrapper project, I do not get a installer that I can really start. For setup projects instead, I do get something I can really start. – Daan Mar 31 '21 at 14:12
  • Are you in Visual Studio 2019 or what version do you use? Your source does compile here once I change the executable name to one I have locally. You need to create a bootstrapper project and you need to have installed both WiX and the Visual Studio integration: https://wixtoolset.org/releases/ - https://marketplace.visualstudio.com/items?itemName=WixToolset.WixToolsetVisualStudio2019Extension - do a reboot after installation for good measure as well (can sometimes help - replaces locked files, removes locks etc...). – Stein Åsmul Mar 31 '21 at 14:19
  • @Daan What do you mean by "really start"? Maybe it's obvious, but just to be sure - bootstrapper project will not run using visual studio. You should "build solution" and go to debug/release folder and run exe. – ba-a-aton Mar 31 '21 at 14:21
  • Yes, good point. You have to locate the binary yourself after compilation. The usual *Right Click project in solutions view* and do *"Open Folder in File Explorer"*, then double click **`bin`** and then and **`debug`** or **`release`** to find executable. Just in case that is unclear - can be confusing. – Stein Åsmul Mar 31 '21 at 14:23
  • @ba-a-aton I just updated my question to clarify. – Daan Mar 31 '21 at 14:41
  • @SteinÅsmul Thanks for telling. I did this and further clarified my question in an update. – Daan Mar 31 '21 at 14:42
  • @Daan Ah, yes, I had that error message too. Fixed it by addind file to folder) But if you need only to download [see this](https://stackoverflow.com/questions/26850462/how-to-create-a-wix-exepackage-that-only-has-a-download-link/30856225) – ba-a-aton Mar 31 '21 at 14:48
  • @Daan About unresolved reference - I used "WixStandardBootstrapperApplication.RtfLicense" and it has UI with standard RTF license. This id is type of your bootstrapper, so you need to read descriptions of all types and decide what do you want to see in your installer. But at first I'll recomend you to start with RTF just to run it. Additional types may need additional libraries, 'WixStandardBootstrapperApplication.RtfLicense' always works – ba-a-aton Mar 31 '21 at 14:52
  • @ba-a-aton I also tried that other example and it just results in other errors (see latest update) . Everything I try to fully solve (which means, works, runs, shows a GUI and downloads a file) fails and possible solutions explained just change my problems. These do not resolve my problem. Probably, it is because of me being a rookie in Wix. Could you provide a fully working example in the answers? Then, I can solve this issue and assign the bounty. – Daan Mar 31 '21 at 15:05
  • 1
    @Daan well, you're almost finished, you just don't need any Install and uninstall comands. A lot of things from that topic are not needed. But ok, I'll try to write working example. – ba-a-aton Mar 31 '21 at 15:10

1 Answers1

1

So here's working sample based on your updates:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Bundle Name="DLS8SetupBootstrapper" Version="1.0.0.0" Manufacturer="me" UpgradeCode="ada71964-11c8-4877-9544-f72fe65579c0">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
    <Chain>
      <ExePackage Id="DymoLabelSoftware"
        Name="DLS8Setup.8.5.1.exe"
        Compressed="no"
        DownloadUrl="http://download.dymo.com/dymo/Software/Win/DLS8Setup.8.5.1.exe">
          <RemotePayload Description="MyRemoteApp" ProductName="DLS8Setup.8.5.1.exe" Size="119087088" Version="8.5.1.0" Hash="204ecb5296290527418693f3a464b59a8801808f"/>
      </ExePackage>
    </Chain>
  </Bundle>
</Wix>

Note that you need to know size in bytes and sha1 hash of your file. Also "Name" is important attribute.

To check hash I used this resource

Haven't found how to get size online so here's C# sample:

var sizeInBytes = new FileInfo("D:\\DLS8Setup.8.5.1.exe").Length;

So just update that variables for your file and you'll get your installer.

P.S. It will show that DLS8Setup installer GUI. If you need do it silent it will depend on every installer. As I get you want to use your own, not that one from example, so I can't do anything without your file.

ba-a-aton
  • 574
  • 1
  • 4
  • 14
  • This solution works. Thanks. And your explanation is clear. Bounty assignment rights shall be given to me tomorrow (it is part of the rules to wait). So then I can assign the bounty. – Daan Mar 31 '21 at 16:31
  • Great, I'm glad it helped – ba-a-aton Mar 31 '21 at 17:42