firegiant / HeatWaveSupport

Issues-only repository to report HeatWave bugs and feature requests to FireGiant
3 stars 0 forks source link

NetFx:DotNetCompatibilityCheck/@Version requires 3-part version string #29

Closed kingfisher63 closed 1 year ago

kingfisher63 commented 1 year ago

HeatWave Version

0.9.6

Visual Studio Version

17.5.3

Repro Steps

<NetFx:DotNetCompatibilityCheck Property="NET7_STATUS" Platform="x64" RuntimeType="core" RollForward="minor" Version="7.0.0.0" />
<Launch Condition="Installed OR NET7_STATUS = 0" Message=".NET 7 runtime required" />

Discussion

In _fg4netfx.xsd the attribute NetFx:DotNetCompatibilityCheck/@Version is defined as:

<xs:attribute name="Version" type="wxs:VersionType">
  <xs:annotation>
    <xs:documentation>Version of .NET to check against.</xs:documentation>
  </xs:annotation>
</xs:attribute>

And in _fg4wix.xsd the type wxs:VersionType is defined as:

<xs:simpleType name="VersionType">
  <xs:annotation>
    <xs:documentation>Values of this type will look like: "x.x.x.x" where x is an integer from 0 to 65534.</xs:documentation>
  </xs:annotation>
  <xs:restriction base="xs:string">
    <xs:pattern value="(\d{1,5}\.){3}\d{1,5}" />
  </xs:restriction>
</xs:simpleType>

So NetFx:DotNetCompatibilityCheck/@Version is defined as a 4-part version string.

However NetFx:DotNetCompatibilityCheck/@Version requires a 3-part version string to work correctly (1 or 2 parts will not work either), for example:

<NetFx:DotNetCompatibilityCheck Property="NET7_STATUS" Platform="x64" RuntimeType="core" RollForward="minor" Version="7.0.0" />

This declaration will cause an intellisense warning, but package installation will proceed normally if a compatible runtime (e.g. 7.0.4) is found.

The 'Version' attribute is invalid - The value '7.0.0' is invalid according to its datatype 'http://wixtoolset.org/schemas/v4/wxs:VersionType' - The Pattern constraint failed.

Actual Result

The property _NET7STATUS is assigned the value 12290, the message .NET 7 runtime required is displayed and the installation is aborted even if a compatible runtime (e.g. 7.0.4) is installed.

Expected Result

The property _NET7STATUS is assigned the value 0 and the installation proceeds normally.

FireGiantHelp commented 1 year ago

We expect this issue is fixed in HeatWave v1.0.1 now available in Visual Studio Marketplace so Visual Studio should provide notification of the update.