安装| aspose.pub for .net
通过nuget安装aspose.pub。
Nuget是为.NET下载和安装Aspose API的最简单方法。打开Microsoft Visual Studio和Nuget软件包管理器。搜索“ aspose”以找到所需的Aspose API。单击“安装”,所选的API将在您的项目中下载并引用。
使用软件包管理器控制台安装或更新aspose.pub
您可以按照以下步骤使用“ aspose.pose.pub api”使用软件包管理器:
- 在Visual Studio中打开解决方案/项目。
- 从菜单中选择工具 - >库软件包管理器 - >软件包管理器控制台以打开软件包管理器控制台。
键入命令“ install -package aspose.pub-version x.x.0”,然后按Enter将最新的完整版本安装到您的应用程序中。另外,您可以在命令中添加“ - Preelease”后缀,以指定最新版本还将安装在内的最新版本。
现在,您应该发现Aspose.pub已在您的应用程序中已成功添加并引用了您的应用。
在“软件包管理器控制台”中,您还可以使用命令“ update-package aspose.pub.net”命令,然后按Enter进行检查以查看aspose.pub package的任何更新,并安装它们(如果存在)。您还可以添加“ -prerelease”后缀以更新最新版本。
引用组件
为了使用应用程序中的任何组件,请添加参考。以下步骤描述使用Visual Studio .NET时该怎么办。
- 在解决方案资源管理器中,展开要添加参考的项目节点。
- 右键单击项目的参考节点,然后从菜单中选择添加参考。
- 在“添加参考”对话框中,选择 .net选项卡(默认情况下通常选择)。
- 如果您使用MSI安装程序安装Aspose.pub,则可以在顶部窗格中看到Aspose.pub。选择它,然后单击选择按钮。
- 如果您仅下载并解开了DLL包装,请单击浏览按钮,然后找到Aspose.pub.dll文件。 您已经引用了Aspose.pub,并且应该出现在对话框的选择程序窗格中。
- 单击好的。 aspose.pub参考显示了项目的“参考”节点。
获取汇编构建版本信息
在项目中包含API后,您可以使用 buildversionInfo类获取引用的API版本信息,如以下代码示例所示。
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);
卸载aspose.pub .net
如果您使用MSI安装程序部署Aspose.pub,请按照以下步骤完全删除组件以及相关的演示和文档:
- 从启动菜单中,选择设置,然后是控制面板。
- 单击添加/删除程序。
- 选择aspose.pub。
- 单击更改/删除按钮以删除Aspose.pub。
针对特定的.NET框架版本
尽管Aspose.pub参考.NET Framework 1.1,但可以在仅安装版本1.0的计算机上使用它。但是,您需要在应用程序配置文件中添加一个条目以重定向引用,因为否则该组件将尝试从.NET Framework 1.1加载组件。构成.NET框架的每个组件都必须重定向到使用.NET Framework 1.0版。配置文件是一个可以根据需要更改的XML文件。开发人员可以使用它来更改设置而无需重新编译应用程序。应用程序配置文件的名称和位置取决于应用程序的主机,这可以是以下一个:
可执行的托管应用程序:
The configuration file for an application hosted by the executable host is in the same directory as the application. The name of the configuration file is the name of the application with a .config extension. For example, an application called myApp.exe can be associated with a configuration file called myApp.exe.config.
ASP.NET托管应用程序:
ASP.NET configuration files are called Web.config and placed in the application directory as well. Enter the following XML in the application configuration file:
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>
有关更多信息,请参见 MSDN文章