C# 引用 Quartz.DLL。调试丢失参考时出错

发布于 2024-12-15 21:45:44 字数 382 浏览 3 评论 0原文

我正在尝试使用 Quartz.NET 构建一个简单的调度程序,但是当我尝试运行我的程序时,它“丢失”了引用并给出了 8 个错误。如果我重新添加引用(该引用从未真正消失),错误就会消失,但程序只会执行相同的操作。我正在 Team Server Foundation 上开展这个项目,这对我来说是全新的。我提交了更改,但我根本无法保留第三方引用。

我将 Quartz.DLL 保存在项目的 lib 文件夹中。

这是我收到的错误的屏幕截图。 screenshot with error

我还应该注意,我对 C# 或 Visual Studio 并不是非常熟悉。任何有关如何添加和管理第三方库的建议都会很棒。

I'm trying to build a simple scheduler using Quartz.NET, but when I try to run my program it "loses" the reference and gives me 8 errors. If I re-add the reference, which never actually disappeared, the errors go away, but the program just does the same thing. I'm working on the project on a Team Server Foundation which is completely new to me. I committed the changes, but I simply can't get the third-party references to stick.

I saved the Quartz.DLL in my project in a lib folder.

Here's a screenshot of the errors I'm receiving.
screenshot with errors

I should also note that I'm not really super familiar with C# or Visual Studios. Any advice on how to add and manage a third-party library would be great.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

带上头具痛哭 2024-12-22 21:45:44

检查您的项目属性是否在 .net 4.0 下运行,而不是在客户端配置文件下运行。

check if your project's properties is running under .net 4.0 and not client profile.

硬不硬你别怂 2024-12-22 21:45:44

我认为您的问题是上面的 using System.DateTime; using Quartz; 。尝试删除它,看看是否可以解决问题。

另外,如果您运行的是 Quartz 2.0,则需要确保您至少面向 .Net 3.5 框架,而不是 2.0。请参阅此处的重大变更信息。

I think your issue is the using System.DateTime; above using Quartz;. Try removing that to see if it fixes the issues.

Also, if you are running Quartz 2.0, you need to be sure that you are targetting at least the .Net 3.5 framework, not 2.0. See the breaking changes information here.

渔村楼浪 2024-12-22 21:45:44

右键单击 Home_Control 项目。 选择属性>>选择“应用程序”选项卡>>寻找目标框架:>>将其更改为 .Net Framework 4(注意:请根据您的项目选择合适的版本。请不要选择.Net Framework 4 Client Profile或.Net Framework 3.5 Client Profile)。

现在尝试构建项目。

Right click on Home_Control project. Select properties >> Select Application tab >> Look for the Target framework: >> Change it to .Net Framework 4 (Note: Please select the appropriate version depending on your project. Please Don't Select .Net Framework 4 Client Profile or .Net Framework 3.5 Client Profile).

Try Building the project now.

抠脚大汉 2024-12-22 21:45:44

删除 Qurtz 引用并手动添加新引用。使用包文件夹中 netXX-client 文件夹的引用。

remove the Qurtz reference and add new reference manually . Use reference from netXX-client folder in package folder.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文