aboutsummaryrefslogtreecommitdiff
path: root/src/wixext/netfx.xsd
blob: 6ef4e9b66b16534c3af4a0325c81ebbb782b810a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->


<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
          xmlns:xse=" http://wixtoolset.org/schemas/XmlSchemaExtension"
         xmlns:html="http://www.w3.org/1999/xhtml"
    targetNamespace="http://wixtoolset.org/schemas/v4/wxs/netfx"
              xmlns="http://wixtoolset.org/schemas/v4/wxs/netfx">
    <xs:annotation>
        <xs:documentation>
            The source code schema for the WiX Toolset .NET Framework Extension.
        </xs:documentation>
    </xs:annotation>

    <xs:element name="NativeImage">
        <xs:annotation>
            <xs:documentation>
                Improves the performance of managed applications by creating native images.
                Requires the .NET Framework 2.0 or newer to be installed on the target machine since
                it runs <html:a href="http://msdn.microsoft.com/en-us/library/6t9t5wcf.aspx">NGen</html:a>.
            </xs:documentation>
            <xs:appinfo>
                <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="File" />
                <xse:remarks>
                    <html:p>
                        Native images are files containing compiled processor-specific machine code, which
                        are installed into the native image cache on the local computer. The runtime
                        can use native images from the cache instead using the just-in-time (JIT)
                        compiler to compile the original assembly.
                    </html:p>
                    <html:p>
                        The native image custom actions are configured to ignore failures so that failing
                        to generate or remove a native image will not cause setup to fail and roll back.
                    </html:p>
                    <html:p>
                        <html:b>Note for patches:</html:b> if you built your target, or baseline, MSI with
                        previous versions 3.0 or 3.5 of this extension and want to upgrade to formattable
                        values for @AssemblyApplication or @AppBaseDirectory you must also include a
                        BinaryRef to "NetFxCA" to pull in necessary changes. If you do use formattable
                        values and do not include the binary changes ngen.exe will not optimize your
                        native images for the specified application.
                    </html:p>
                    <html:p>
                        This should be a rare occurrence, however. Because you cannot remove components
                        in a patch - and pyro does validate you do not - it is not practical to switch
                        from using identifiers to formattable values in a patch. One practical possibility
                        is if you wanted to use a different application to optimize your native images
                        and that application is not already installed with the MSI to be updated.
                    </html:p>
                </xse:remarks>
            </xs:appinfo>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute name="Id" type="xs:string" use="required">
                <xs:annotation>
                    <xs:documentation>
                        The identifier for this NativeImage.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="AppBaseDirectory" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        <html:p>
                            The directory to use for locating dependent assemblies.
                            For DLL assemblies and assemblies installed to the Global Assembly Cache (GAC),
                            this attribute should be set to the directory of the application which loads this
                            assembly.  For EXE assemblies, this attribute does not need to be set because NGen
                            will use the directory of the assembly file by default.
                        </html:p>
                        <html:p>
                            The value can be in the form of a directory identifier, or a formatted string
                            that resolves to either a directory identifier or a full path to a directory.
                        </html:p>
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="AssemblyApplication" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        <html:p>
                            The application which will load this assembly.
                            For DLL assemblies which are loaded via reflection, this attribute should
                            be set to indicate the application which will load this assembly.
                            The configuration of the application (usually specified via an exe.config file) will be used
                            to determine how to resolve dependencies for this assembly.
                        </html:p>
                        <html:p>
                            The value can be in the form of a file identifier, or a formatted string
                            that resolves to either a file identifier or a full path to a file.
                        </html:p>
                        <html:p>
                            When a shared component is loaded at run time, using the Load method, the
                            application's configuration file determines the dependencies that are loaded
                            for the shared component — for example, the version of a dependency that is loaded.
                            This attribute gives guidance on which dependencies would be loaded at run time in order
                            to figure out which dependency assemblies will also need to have native images generated
                            (assuming the Dependency attribute is not set to "no").
                        </html:p>
                        <html:p>
                            This attribute cannot be set if the AssemblyApplication attribute is set on the parent
                            File element (please note that these attributes both refer to the same application
                            assembly but do very different things: specifiying File/@AssemblyApplication will force
                            an assembly to install to a private location next to the indicated application, whereas
                            this AssemblyApplication attribute will be used to help resolve dependent assemblies
                            while generating native images for this assembly).
                        </html:p>
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="Debug" type="YesNoType">
                <xs:annotation>
                    <xs:documentation>
                        Set to "yes" to generate native images that can be used under a debugger.
                        The default value is "no".
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="Dependencies" type="YesNoType">
                <xs:annotation>
                    <xs:documentation>
                        Set to "no" to generate the minimum number of native images.
                        The default value is "yes".
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="Platform">
                <xs:annotation>
                    <xs:documentation>
                        Sets the platform(s) for which native images will be generated.
                    </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="32bit">
                            <xs:annotation>
                                <xs:documentation>
                                    Attempt to generate native images only for the 32-bit version of the .NET Framework
                                    on the target machine.  If the 32-bit version of the .NET Framework 2.0 or newer is not
                                    present on the target machine, native image custom actions will not be scheduled.
                                    This is the default value.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="64bit">
                            <xs:annotation>
                                <xs:documentation>
                                    Attempt to generate native images only for the 64-bit version of the .NET Framework
                                    on the target machine.  If a 64-bit version of the .NET Framework 2.0 or newer is not
                                    present on the target machine, native image custom actions will not be scheduled.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="all">
                            <xs:annotation>
                                <xs:documentation>
                                    Attempt to generate native images for the 32-bit and 64-bit versions of the .NET Framework
                                    on the target machine.  If a version of the .NET Framework 2.0 or newer is not present on the
                                    target machine for a processor architecture, native image custom actions will not be
                                    scheduled for that processor architecture.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="Priority">
                <xs:annotation>
                    <xs:documentation>
                        Sets the priority of generating the native images for this assembly.
                    </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="0">
                            <xs:annotation>
                                <xs:documentation>
                                    This is the highest priority, it means that image generation occurs syncronously
                                    during the setup process.  This option will slow down setup performance.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="1">
                            <xs:annotation>
                                <xs:documentation>
                                    This will queue image generation to the NGen service to occur immediately.
                                    This option will slow down setup performance.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="2">
                            <xs:annotation>
                                <xs:documentation>
                                    This will queue image generation to the NGen service to occur after all priority 1
                                    assemblies have completed.
                                    This option will slow down setup performance.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="3">
                            <xs:annotation>
                                <xs:documentation>
                                    This is the lowest priority, it will queue image generation to occur when the
                                    machine is idle.
                                    This option should not slow down setup performance.
                                    This is the default value.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="Profile" type="YesNoType">
                <xs:annotation>
                    <xs:documentation>
                        Set to "yes" to generate native images that can be used under a profiler.
                        The default value is "no".
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:simpleType name="YesNoType">
        <xs:annotation>
            <xs:documentation>Values of this type will either be "yes" or "no".</xs:documentation>
        </xs:annotation>
        <xs:restriction base='xs:NMTOKEN'>
            <xs:enumeration value="no"/>
            <xs:enumeration value="yes"/>
        </xs:restriction>
    </xs:simpleType>

</xs:schema>