找不到 Microsoft.Win32.TaskScheduler - 我想在 VB.NET 中导入这个命名空间

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2892014/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 14:53:47  来源:igfitidea点击:

Microsoft.Win32.TaskScheduler NOT FOUND - I want to import this namespace in VB.NET

vb.netwinapinamespacesscheduled-tasks

提问by John Cruz

I've been looking at sample code for interfacing with the Windows Task Scheduler, and most of them import the namespace:

我一直在查看用于与 Windows 任务计划程序交互的示例代码,其中大多数都导入了命名空间:

Microsoft.Win32.TaskScheduler

When I go to import it, it's not there within Win32.

当我去导入它时,它不在Win32.

Does anyone know why I can't import it? I'm assuming that something isn't registered correctly on my machine, but I can't figure out how to fix it.

有谁知道为什么我不能导入它?我假设我的机器上没有正确注册某些东西,但我不知道如何修复它。

Just for the record, I can start the Scheduled Task component under Accessories. I'm using VS 2008 (VB.Net) with Windows XP Professional.

只是为了记录,我可以启动附件下的计划任务组件。我在 Windows XP Professional 上使用 VS 2008 (VB.Net)。

回答by Mitch Wheat

In your project, you need to add a reference to the Microsoft.Win32.TaskScheduler.dllthat was part of the codeplex download.

在您的项目中,您需要添加Microsoft.Win32.TaskScheduler.dllcodeplex 下载一部分的引用。

[The usual place is to create a folder as part of your source tree for external Libs and reference from there.]

[通常的地方是创建一个文件夹作为外部库的源树的一部分并从那里引用。]

Update: Current practice would be to use NuGet to manage a dependency: https://www.nuget.org/packages/TaskScheduler/

更新:目前的做法是使用 NuGet 来管理依赖项:https: //www.nuget.org/packages/TaskScheduler/