Installation | Aspose.PUB for .NET

Installing Aspose.PUB for .NET through NuGet

NuGet is the easiest way to download and install Aspose APIs for .NET. Open Microsoft Visual Studio and NuGet package manager. Search “aspose” to find the desired Aspose API. Click on “Install”, the selected API will be downloaded and referenced in your project.

Visual Studio NuGet manager searching for Aspose API

Install or Update Aspose.PUB using the Package Manager Console

You can follow the steps below to reference the Aspose.PUB API using the package manager console:

  1. Open your solution/project in Visual Studio.
  2. Select Tools -> Library Package Manager -> Package Manager Console from the menu to open package manager console.

Opening the package manager console

Type the command “Install-Package Aspose.PUB -Version x.x.0” and press enter to install latest full release into your application. Alternatively, you can add the “-prerelease” suffix to the command in order to specify that the latest release including hot fixes is to be installed as well.

Console package installation

If you are not familiar with the  Aspose EULA then it is a good idea to read the license referenced in the URL. 

You should now find that Aspose.PUB has successfully been added and referenced in your application for you.

Aspose.PUB in the references section of the solution explorer

In the package manager console, you can also use the command “Update-Package Aspose.PUB.NET” and press enter to check for any updates to the Aspose.PUB package and install them if present. You can also add the “-prerelease” suffix to update the latest release.

Referencing the Component

In order to use any component in your application, add a reference to it. The steps that follow describe what to do when you use Visual Studio .NET.

  1. In the Solution Explorer, expand the project node you want to add a reference to.
  2. Right-click the References node for the project and select Add Reference from the menu.
  3. In the Add Reference dialog box, select the .NET tab (it’s usually selected by default).
  4. If you have used MSI installer to install Aspose.PUB, you will see Aspose.PUB in the top pane. Select it and then click the Select button.
  5. If you have downloaded and unpacked the DLL only, click the Browse button and locate the Aspose.PUB.dll file.  You have referenced Aspose.PUB and it should appear in the SelectedComponents pane of the dialog box.
  6. Click OK.  An Aspose.PUB reference appears under the References node of the project.

Get Assembly Build Version Information

Once you include the API in your project, you can get the referenced API version information using the  BuildVersionInfo class as shown in the following code sample.

1// For complete examples and data files, please go to https://github.com/aspose-pub/Aspose.PUB-for-.NET
2Console.WriteLine("Assembly Version: {0}", Aspose.Pub.BuildVersionInfo.AssemblyVersion);
3Console.WriteLine("File Version: {0}", Aspose.Pub.BuildVersionInfo.FileVersion);
4Console.WriteLine("Product: {0}", Aspose.Pub.BuildVersionInfo.Product);

Uninstalling Aspose.PUB for .NET

If you have used MSI installer to deploy Aspose.PUB, follow these steps to completely remove the component and the associated demos and documentation:

  1. From the Start menu, select Settings followed by Control Panel.
  2. Click Add/Remove Programs.
  3. Select Aspose.PUB.
  4. Click the Change/Remove button to remove Aspose.PUB.

Targeting Specific .NET Framework Version

Although Aspose.PUB references .NET Framework 1.1, it is possible to use it on a machine with only version 1.0 installed. But you need to add an entry to the application configuration file to redirect the references because otherwise the component will try to load assemblies from .NET Framework 1.1. Each assembly that makes up the .NET Framework must be redirected to use .NET Framework version 1.0. Configuration file is an XML file that can be changed as needed. Developers can use it to change settings without recompiling applications. The name and location of the application configuration file depend on the application’s host, which can be one of the following:

XML

  1 <configuration>
  2
  3  <startup>
  4
  5    <requiredRuntime version="v1.0.3705"  />
  6
  7  </startup>
  8
  9  <runtime>
 10
 11    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v1.0.3705">
 12
 13      <dependentAssembly>
 14
 15        <assemblyIdentity name="Regcode" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
 16
 17        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
 18
 19      </dependentAssembly>
 20
 21      <dependentAssembly>
 22
 23        <assemblyIdentity name="System.EnterpriseServices" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
 24
 25        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
 26
 27      </dependentAssembly>
 28
 29      <dependentAssembly>
 30
 31        <assemblyIdentity name="System.Security" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
 32
 33        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
 34
 35      </dependentAssembly>
 36
 37      <dependentAssembly>
 38
 39        <assemblyIdentity name="CustomMarshalers" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
 40
 41        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
 42
 43      </dependentAssembly>
 44
 45      <dependentAssembly>
 46
 47        <assemblyIdentity name="Accessibility" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
 48
 49        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
 50
 51      </dependentAssembly>
 52
 53      <dependentAssembly>
 54
 55        <assemblyIdentity name="System.Configuration.Install" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
 56
 57        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
 58
 59      </dependentAssembly>
 60
 61      <dependentAssembly>
 62
 63        <assemblyIdentity name="System.DirectoryServices" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
 64
 65        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
 66
 67      </dependentAssembly>
 68
 69      <dependentAssembly>
 70
 71        <assemblyIdentity name="System.Drawing.Design" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
 72
 73        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
 74
 75      </dependentAssembly>
 76
 77      <dependentAssembly>
 78
 79        <assemblyIdentity name="System.ServiceProcess" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
 80
 81        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
 82
 83      </dependentAssembly>
 84
 85      <dependentAssembly>
 86
 87        <assemblyIdentity name="System.Web" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
 88
 89        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
 90
 91      </dependentAssembly>
 92
 93      <dependentAssembly>
 94
 95        <assemblyIdentity name="System.Web.RegularExpressions" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
 96
 97        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
 98
 99      </dependentAssembly>
100
101      <dependentAssembly>
102
103        <assemblyIdentity name="System.Web.Services" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
104
105        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
106
107      </dependentAssembly>
108
109      <dependentAssembly>
110
111        <assemblyIdentity name="System.Windows.Forms" publicKeyToken="b77a5c561934e089" culture=""/>
112
113        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
114
115      </dependentAssembly>
116
117      <dependentAssembly>
118
119        <assemblyIdentity name="System.Xml" publicKeyToken="b77a5c561934e089" culture=""/>
120
121        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
122
123      </dependentAssembly>
124
125      <dependentAssembly>
126
127        <assemblyIdentity name="System.Data" publicKeyToken="b77a5c561934e089" culture=""/>
128
129        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
130
131      </dependentAssembly>
132
133      <dependentAssembly>
134
135        <assemblyIdentity name="System.Design" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
136
137        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
138
139      </dependentAssembly>
140
141      <dependentAssembly>
142
143        <assemblyIdentity name="System.Drawing" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
144
145        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
146
147      </dependentAssembly>
148
149      <dependentAssembly>
150
151        <assemblyIdentity name="System" publicKeyToken="b77a5c561934e089" culture=""/>
152
153        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
154
155      </dependentAssembly>
156
157      <dependentAssembly>
158
159        <assemblyIdentity name="System.Messaging" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
160
161        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
162
163      </dependentAssembly>
164
165      <dependentAssembly>
166
167        <assemblyIdentity name="IEExecRemote" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
168
169        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
170
171      </dependentAssembly>
172
173      <dependentAssembly>
174
175        <assemblyIdentity name="IEHost" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
176
177        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
178
179      </dependentAssembly>
180
181      <dependentAssembly>
182
183        <assemblyIdentity name="IIEHost" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
184
185        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
186
187      </dependentAssembly>
188
189      <dependentAssembly>
190
191        <assemblyIdentity name="ISymWrapper" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
192
193        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
194
195      </dependentAssembly>
196
197      <dependentAssembly>
198
199        <assemblyIdentity name="mscorcfg" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
200
201        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
202
203      </dependentAssembly>
204
205      <dependentAssembly>
206
207        <assemblyIdentity name="System.Management" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
208
209        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
210
211      </dependentAssembly>
212
213      <dependentAssembly>
214
215        <assemblyIdentity name="System.Runtime.Remoting" publicKeyToken="b77a5c561934e089" culture=""/>
216
217        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
218
219      </dependentAssembly>
220
221      <dependentAssembly>
222
223        <assemblyIdentity name="System.Runtime.Serialization.Formatters.Soap" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
224
225        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
226
227      </dependentAssembly>
228
229      <dependentAssembly>
230
231        <assemblyIdentity name="System.Web.Mobile" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
232
233        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.3300.0"/>
234
235      </dependentAssembly>
236
237      <dependentAssembly>
238
239        <assemblyIdentity name="Microsoft.Vsa.Vb.CodeDOMProcessor" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
240
241        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
242
243      </dependentAssembly>
244
245      <dependentAssembly>
246
247        <assemblyIdentity name="Microsoft_VsaVb" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
248
249        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
250
251      </dependentAssembly>
252
253      <dependentAssembly>
254
255        <assemblyIdentity name="Microsoft.Vsa" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
256
257        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
258
259      </dependentAssembly>
260
261      <dependentAssembly>
262
263        <assemblyIdentity name="Microsoft.VisualBasic.Vsa" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
264
265        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
266
267      </dependentAssembly>
268
269      <dependentAssembly>
270
271        <assemblyIdentity name="cscompmgd" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
272
273        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
274
275      </dependentAssembly>
276
277      <dependentAssembly>
278
279        <assemblyIdentity name="Microsoft.JScript" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
280
281        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
282
283      </dependentAssembly>
284
285      <dependentAssembly>
286
287        <assemblyIdentity name="Microsoft.VisualBasic" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
288
289        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
290
291      </dependentAssembly>
292
293      <dependentAssembly>
294
295        <assemblyIdentity name="Microsoft.VisualC" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
296
297        <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="7.0.3300.0"/>
298
299      </dependentAssembly>
300
301    </assemblyBinding>
302
303  </runtime>
304
305</configuration>

For more information see  MSDN article

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.