问题描述
我想在我的WPF项目中添加一个系统托盘图标,并找到这个资源:
I'm wanting to include a system tray icon in my WPF project, and found this resource:
其中看起来它会很好的工作,但它是为C#编写的,我正在使用VB.net这个项目。我下载了他的项目,并将notifyicon构建为一个DLL,然后添加为我的项目的参考。
which looks like it will work beautifully, but it's written for C# and I'm using VB.net for this project. I downloaded his project and built the notifyicon as a DLL, then added as a reference to my project.
它会引发错误:
所以我试图找出最好的方法继续。我需要强名吗?还是有更好的方法呢?
So I'm trying to figure out the best way to proceed. Do I need to strong name it, or is there a better way to do this?
推荐答案
你需要添加一个强名称到另一个程序集,或使您的项目不包含强名称。
You will need to add a strong name to the other assembly, or make your project not include a strong name.
由于您已经在构建它,您可以在项目属性中添加一个强名称,并重建。一旦你这样做,它应该工作(根本不改变代码)。
Since you're already building it, you can just add a strong name in the project properties, and rebuild. Once you do that, it should work (without changing the code at all).
这篇关于为什么我会看到“无法发出程序集:引用程序集...没有强名称”当试图添加引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!