# PackageRestore class

Namespace: [Grasshopper2.Framework](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.framework.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public static class PackageRestore
```

Fetches the plugins a document needs but does not have.

This happens in two steps, deliberately. [PackageRestore.Offer(PluginRequirement)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.packagerestore/offer.md) asks the package server what it can supply, which is what allows the user to be shown a button only when pressing it would achieve something. [PackageRestore.Restore(PackageOffer, bool, IProgress<string>)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.packagerestore/restore.md) then acts on an offer without going back to the server to ask the same questions again.

A restore can be permanent, which is an ordinary installation the user keeps, or fleeting, which lasts only as long as this session and leaves the plugin's objects out of the icon panels — see [FleetingPlugins](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.fleetingplugins.md). The mechanics are identical either way; only the bookkeeping differs.

## Properties

- [Available](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.packagerestore/available.md): (static) Gets whether restoring is possible at all in this installation. False means Rhino's package assembly could not be found, and no offer will ever come to anything.

## Methods

- [Offer](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.packagerestore/offer.md): (static) Ask the package server what it can do about a missing plugin. This talks to a server and must not be awaited from the UI thread.
- [Restore](https://developer.rhino3d.com/api/gh2/type/grasshopper2.framework.packagerestore/restore.md): (static) Act on an offer: download the package, install it, and load the plugin. This talks to a server and must not be awaited from the UI thread. The one part which does need the UI thread — loading a plugin, which makes the panels rebuild — is marshalled there internally.
