C#添加资源错误和调用函数 [英] C# adding a resource error and calling function

查看:197
本文介绍了C#添加资源错误和调用函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



它给我的错误是:



错误1源文件'C:\Documents and Settings\Administrator\Local Settings\Application Data\Temporary Projects\bluRemoteProg\Resources\HIDLibrary.dll'无法打开('Unspecified error')bluRemoteProg



我忘记了什么?



David



更新



得到它的工作,但是如何从表单菜单调用一个函数?我试过:

  PS3_BluMote.PS3RemoteDevice.Connect(); 

  PS3_BluMote.PS3RemoteDevice.Connect(); 



但似乎不起作用...

解决方案

您可以在解决方案中添加一个新项目:例如 YourApp.Engine 作为 C#Class Libraray 项目,然后将您的资源添加到该项目中(双击 YourApp.Engine 项目,然后单击资源选项卡)。



您现在可以在应用程序的任何地方使用您的名为 YourApp.Engine 的DLL:

 使用YourApp.Engine; 


Hey all i am new at C# and i am trying to add a resource to a .dll file.

It gives me the error of:

Error 1 Source file 'C:\Documents and Settings\Administrator\Local Settings\Application Data\Temporary Projects\bluRemoteProg\Resources\HIDLibrary.dll' could not be opened ('Unspecified error ') bluRemoteProg

What am i forgetting to do?

David

UPDATE

Got it working but how do i call a function from the form menu? I've tried:

PS3_BluMote.PS3RemoteDevice.Connect();

and

PS3_BluMote.PS3RemoteDevice.Connect();

but that does not seem to work...

解决方案

You can add a new project to your solution: e.g. YourApp.Engine as a C# Class Libraray project, then add your resources to that project (Double-click properties of YourApp.Engine project, and click Resources tab).

you can now use your DLL named YourApp.Engine everywhere in your app:

using YourApp.Engine;

这篇关于C#添加资源错误和调用函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆