Microsoft.SqlServer.Management.Smo 参考中未显示备份类 [英] Backup Class Not Showing in Microsoft.SqlServer.Management.Smo Reference
问题描述
我想在 C# Windows 窗体应用程序中添加备份和恢复功能.为此,我插入了
I want to add Backup and Restore Functionality in C# Windows Form Application. for this i inserted
我的代码中引用了 Microsoft.SqlServer.Management.Smo .. 但我在此引用中看不到备份和还原类.
Microsoft.SqlServer.Management.Smo reference in my code.. but I can't see the Backup and Restore classes in this reference.
推荐答案
我自己找到了答案.那就是
I found the answer by my self. and that is
要使用 SMO 的备份和还原类,我们需要 5 个参考.
for using Backup and restore class of SMO we need to 5 reffereces.
转到您的应用程序并右键单击引用"文件夹并选择添加引用".
Go to Your Application and Right Click on References folder and select Add Reference.
现在转到浏览"选项卡并浏览以下路径 - C:\Program Files\Microsoft SQL Server\110\SDK\Assemblies
Now Go to "Browse" Tab and browse the following path- C:\Program Files\Microsoft SQL Server\110\SDK\Assemblies
现在选择以下dll
- Microsoft.SqlServer.ConnectionInfo.dll
- Microsoft.SqlServer.Management.Sdk.Sfc.dll
- Microsoft.SqlServer.Smo.dll
- Microsoft.SqlServer.SmoExtended.dll
- Microsoft.SqlServer.SqlEnum.dll
我首先仅添加了此 (Microsoft.SqlServer.Smo.dll) 参考,但对于备份和还原类,我们还需要此 (Microsoft.SqlServer.SmoExtended.dll) 参考
I have added only this (Microsoft.SqlServer.Smo.dll) reference first but for Backup and Restore classes we also need this (Microsoft.SqlServer.SmoExtended.dll) reference
这篇关于Microsoft.SqlServer.Management.Smo 参考中未显示备份类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!