Skip to content

Require "accept EULA" #9196

Description

@robmen

User story

  • As a setup developer, I am aware of and accept the OSMF EULA in the WiX Toolset

Proposal

The Open Source Maintenance Fee was introduced in WiX v6. The original design expected that setting requireLicenseAcceptance would cause .NET tooling to prompt the user to accept the EULA. Visual Studio does prompt users when adding PackageReferences but command-line usage (such as dotnet tool install) does not (see issues: dotnet/sdk#48272, dotnet/sdk#48273 and NuGet/Home#14632).

This requires consumers to recognize the license change in WiX v6 without being directly prompted. Many consumers have recognized the change as we added information to our documentation and announcements (good for them!), but we should make it is easy as possible to NOT violate the EULA.

The .NET team does not seem interested in tackling them problem themselves (see their responses in above issues) so we need a solution in WiX itself. Fortunately, we have two key entry points: wix.exe and MSBuild.

So, let's add a simple "accept EULA" mechanism to note when the user accepts the EULA and error the build process if they have not. For example, either of these two command-lines will accept the EULA:

wix.exe eula accept wix7
msbuild -t:AcceptEula -p:EulaId=wix7

Since the EULA could change from version to version, we'll require a value that matches the major version by default, and we can include the minor version if the EULA change in a minor version (definitely not ideal).

The result of those commands is a text file named after the accepted EULA version in the user's profile. When a non-EULA command is run, WiX checks if that file exists. If not, an error is displayed that explains the OSMF EULA and how to accept it.

For one-off commands, wix.exe can have an -acceptEula switch that bypasses the need to check for the EULA acceptance file.

wix.exe build -acceptEula wix7 *.wxs -out my.msi

We should also provide a simple experience for MSBuild users, like a property AcceptEula. The value of that property would be routed to wix.exe to satisfy the -acceptEula switch. We could also validate the property in MSBuild with a lightweight CheckLicenseAcceptance Target which could be included in all WiX Toolset .nupkgs. In a consuming .wixproj or .csproj (for DTF custom actions) it would look like:

<PropertyGroup>
   <AcceptEula>wix7</AcceptEula>
</PropertyGroup>

If this "EULA acceptance" catches on with other OSMF projects, it might look like this:

<PropertyGroup>
   <AcceptEula>wix7;other_osmf_licenses;another_licensed</AcceptEula>
</PropertyGroup>

Considerations

  • Should we call it -acceptEula and <AcceptEula> or be more OSMF specific like -acceptOsmf and <AcceptOsmf>? Or should we specialize the property to WiX and use something like <AcceptWixEula> and be completely separate from other OSMF projects?

    • Decision: AcceptEula is good.
  • Should -acceptEula remember acceptance? We could write a sentinel to the user's profile to indicate acceptance. This would mostly be to simplify the command-line experience if you happen to run wix.exe commands regularly. MSBuild users would set the property once and be done with it.

    • Decision: No, but did add explicit accept EULA command to the command-line and MSBuild that are remembered.

Acknowledgements

Metadata

Metadata

Assignees

Labels

wipWiX Improvement Proposal

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions