You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sp-add-ins/update-add-in-web-components-in-sharepoint.md
+18-19Lines changed: 18 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -192,7 +192,7 @@ Because there is already such an element in the **ElementManifests** section, si
192
192
193
193
3. Add the following markup to the **asp:Content** element, and then replace _{RelativePathToNewPageFile}_ with the new path and file name. This script redirects the browser to the new page and includes the query parameters. It also keeps the old page out of the browser history.
194
194
195
-
```
195
+
```html
196
196
<scripttype="text/javascript">
197
197
var queryString = window.___location.search.substring(1);
@@ -274,25 +274,24 @@ For the most part, this is exactly what should occur: you want every earlier ver
274
274
275
275
Each time that you upgrade the Feature, follow the same pattern. Add a new **VersionRange** for the latest update actions. Add an **EndVersion** element to the _previous_ **VersionRange** element and set it to the previous version number. In the continuing example, the file would resemble the following for the update from 3.0.0.0 to 4.0.0.0.
276
276
277
-
278
277
```XML
279
-
<Feature <!-- Some attributes omitted -->
280
-
Version="4.0.0.0">
281
-
<ElementManifests>
282
-
<!-- Child elements omitted -->
283
-
</ElementManifests>
284
-
<UpgradeActions>
285
-
<VersionRangeEndVersion="2.0.0.0">
286
-
<!-- Child elements for upgrade from 1.0.0.0 to 2.0.0.0 go here. -->
287
-
</VersionRange>
288
-
<VersionRangeEndVersion="3.0.0.0">
289
-
<!-- Child elements for upgrade from 2.0.0.0 to 3.0.0.0 go here. -->
290
-
</VersionRange>
291
-
<VersionRange>
292
-
<!-- Child elements for upgrade from 3.0.0.0 to 4.0.0.0 go here. -->
293
-
</VersionRange>
294
-
</UpgradeActions>
295
-
</Feature>
278
+
<Feature <!-- Some attributes omitted -->
279
+
Version="4.0.0.0">
280
+
<ElementManifests>
281
+
<!-- Child elements omitted -->
282
+
</ElementManifests>
283
+
<UpgradeActions>
284
+
<VersionRangeEndVersion="2.0.0.0">
285
+
<!-- Child elements for upgrade from 1.0.0.0 to 2.0.0.0 go here. -->
286
+
</VersionRange>
287
+
<VersionRangeEndVersion="3.0.0.0">
288
+
<!-- Child elements for upgrade from 2.0.0.0 to 3.0.0.0 go here. -->
289
+
</VersionRange>
290
+
<VersionRange>
291
+
<!-- Child elements for upgrade from 3.0.0.0 to 4.0.0.0 go here. -->
292
+
</VersionRange>
293
+
</UpgradeActions>
294
+
</Feature>
296
295
```
297
296
298
297
Notice that the most recent **VersionRange** element has no **BeginVersion** or **EndVersion** attributes. This ensures that the upgrade actions that go into this **VersionRange** element are applied to all previous versions of the Feature, which is what you want because all the latest changes are referenced in this **VersionRange**, and none of them have already occurred for any instance of the Feature.
0 commit comments