-
Notifications
You must be signed in to change notification settings - Fork 14
/
UpdateCheckInfo.xml
209 lines (184 loc) · 13.1 KB
/
UpdateCheckInfo.xml
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
<Type Name="UpdateCheckInfo" FullName="System.Deployment.Application.UpdateCheckInfo">
<TypeSignature Language="C#" Value="public class UpdateCheckInfo" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit UpdateCheckInfo extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Deployment.Application.UpdateCheckInfo" />
<TypeSignature Language="VB.NET" Value="Public Class UpdateCheckInfo" />
<TypeSignature Language="F#" Value="type UpdateCheckInfo = class" />
<TypeSignature Language="C++ CLI" Value="public ref class UpdateCheckInfo" />
<AssemblyInfo>
<AssemblyName>System.Deployment</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Represents detailed update information obtained through a call to <see cref="M:System.Deployment.Application.ApplicationDeployment.CheckForDetailedUpdate" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
With <xref:System.Deployment.Application.UpdateCheckInfo>, you can decide whether to upgrade your ClickOnce application based on information about the newest version. <xref:System.Deployment.Application.UpdateCheckInfo.UpdateAvailable%2A> will return a Boolean value indicating whether there is a new update at all. The <xref:System.Deployment.Application.UpdateCheckInfo.AvailableVersion%2A> property provides the version number of the new version, while <xref:System.Deployment.Application.UpdateCheckInfo.MinimumRequiredVersion%2A> provides the earliest version that the user should have installed. <xref:System.Deployment.Application.UpdateCheckInfo.IsUpdateRequired%2A> expresses whether the latest available update is required of the user. Finally, <xref:System.Deployment.Application.UpdateCheckInfo.UpdateSizeBytes%2A> expresses the total size of the update.
> [!NOTE]
> Visual Studio adds the `<deploymentProvider>` element to the manifest only if the application is set to check for updates, so you either have to check **The application should check for updates** or specify an update URL in **Update location** in the [Application Updates Dialog Box](https://msdn.microsoft.com/library/8eca8743-8e68-4d04-bfd5-4dc0a9b2934f).
## Examples
The following code example uses <xref:System.Deployment.Application.UpdateCheckInfo.UpdateAvailable%2A> to determine if there is a new application update, and <xref:System.Deployment.Application.UpdateCheckInfo.IsUpdateRequired%2A> to determine whether to ask the user to install the update.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ClickOnceAPI/cpp/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Deployment.Application/ApplicationDeployment/Overview/Form1.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ClickOnceAPI/VB/Form1.vb" id="Snippet6":::
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName="AvailableVersion">
<MemberSignature Language="C#" Value="public Version AvailableVersion { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Version AvailableVersion" />
<MemberSignature Language="DocId" Value="P:System.Deployment.Application.UpdateCheckInfo.AvailableVersion" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AvailableVersion As Version" />
<MemberSignature Language="F#" Value="member this.AvailableVersion : Version" Usage="System.Deployment.Application.UpdateCheckInfo.AvailableVersion" />
<MemberSignature Language="C++ CLI" Value="public:
 property Version ^ AvailableVersion { Version ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Deployment</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Version</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the version number of the latest uninstalled version.</summary>
<value>The <see cref="T:System.Version" /> expressing the major and minor build and revision numbers of the latest version.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can use <xref:System.Deployment.Application.UpdateCheckInfo.AvailableVersion%2A> to decide whether to install the update based on the severity of the update. For example, if only the <xref:System.Version.Build%2A> or <xref:System.Version.Revision%2A> version properties have changed, your application may not need to update until either the <xref:System.Version.Minor%2A> or <xref:System.Version.Major%2A> properties change.
]]></format>
</remarks>
<altmember cref="P:System.Deployment.Application.UpdateCheckInfo.MinimumRequiredVersion" />
</Docs>
</Member>
<Member MemberName="IsUpdateRequired">
<MemberSignature Language="C#" Value="public bool IsUpdateRequired { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsUpdateRequired" />
<MemberSignature Language="DocId" Value="P:System.Deployment.Application.UpdateCheckInfo.IsUpdateRequired" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsUpdateRequired As Boolean" />
<MemberSignature Language="F#" Value="member this.IsUpdateRequired : bool" Usage="System.Deployment.Application.UpdateCheckInfo.IsUpdateRequired" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool IsUpdateRequired { bool get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Deployment</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the update must be installed.</summary>
<value>
<see langword="true" /> if the update is required; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When you deploy an update to your ClickOnce application, you can mark it as a required update, signaling to your application that it should upgrade immediately. You want to mark the application if the latest version contains a critical update, or if it is incompatible with file formats or back-end data sources used by the former version.
## Examples
The following code example uses <xref:System.Deployment.Application.UpdateCheckInfo.IsUpdateRequired%2A> to determine whether to ask the user to install the update, or to install it without prompting.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ClickOnceAPI/cpp/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Deployment.Application/ApplicationDeployment/Overview/Form1.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ClickOnceAPI/VB/Form1.vb" id="Snippet6":::
]]></format>
</remarks>
<altmember cref="P:System.Deployment.Application.UpdateCheckInfo.MinimumRequiredVersion" />
</Docs>
</Member>
<Member MemberName="MinimumRequiredVersion">
<MemberSignature Language="C#" Value="public Version MinimumRequiredVersion { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Version MinimumRequiredVersion" />
<MemberSignature Language="DocId" Value="P:System.Deployment.Application.UpdateCheckInfo.MinimumRequiredVersion" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property MinimumRequiredVersion As Version" />
<MemberSignature Language="F#" Value="member this.MinimumRequiredVersion : Version" Usage="System.Deployment.Application.UpdateCheckInfo.MinimumRequiredVersion" />
<MemberSignature Language="C++ CLI" Value="public:
 property Version ^ MinimumRequiredVersion { Version ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Deployment</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Version</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the minimum version that the user must have installed on the computer.</summary>
<value>A <see cref="T:System.Version" /> expressing the least version that the user must install.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Applications can miss required updates when the user takes on a special assignment or is away from the computer for weeks or months. Use
<xref:System.Deployment.Application.UpdateCheckInfo.MinimumRequiredVersion%2A> to determine if the user has not upgraded the application in a while, and has missed one or more required updates.
## Examples
The following code example demonstrates displaying the <xref:System.Deployment.Application.UpdateCheckInfo.MinimumRequiredVersion%2A> property to the user when there is a required update available.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ClickOnceAPI/cpp/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Deployment.Application/ApplicationDeployment/Overview/Form1.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ClickOnceAPI/VB/Form1.vb" id="Snippet6":::
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">There is no new version available to install.</exception>
</Docs>
</Member>
<Member MemberName="UpdateAvailable">
<MemberSignature Language="C#" Value="public bool UpdateAvailable { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool UpdateAvailable" />
<MemberSignature Language="DocId" Value="P:System.Deployment.Application.UpdateCheckInfo.UpdateAvailable" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property UpdateAvailable As Boolean" />
<MemberSignature Language="F#" Value="member this.UpdateAvailable : bool" Usage="System.Deployment.Application.UpdateCheckInfo.UpdateAvailable" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool UpdateAvailable { bool get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Deployment</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets whether an uninstalled update is available.</summary>
<value>
<see langword="true" /> if new version of the application is available; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example inspects <xref:System.Deployment.Application.UpdateCheckInfo.UpdateAvailable%2A> to determine whether there is an update to install.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ClickOnceAPI/cpp/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/snippets/csharp/System.Deployment.Application/ApplicationDeployment/Overview/Form1.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ClickOnceAPI/VB/Form1.vb" id="Snippet6":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="UpdateSizeBytes">
<MemberSignature Language="C#" Value="public long UpdateSizeBytes { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int64 UpdateSizeBytes" />
<MemberSignature Language="DocId" Value="P:System.Deployment.Application.UpdateCheckInfo.UpdateSizeBytes" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property UpdateSizeBytes As Long" />
<MemberSignature Language="F#" Value="member this.UpdateSizeBytes : int64" Usage="System.Deployment.Application.UpdateCheckInfo.UpdateSizeBytes" />
<MemberSignature Language="C++ CLI" Value="public:
 property long UpdateSizeBytes { long get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Deployment</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int64</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the size of the available update.</summary>
<value>An <see cref="T:System.Int64" /> describing the size, in bytes, of the available update. If no update is available, returns 0.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>