类库到系统文件夹 [英] Class Library to System Folder
问题描述
嗨!伙计们,是这种情况,我做了一个ex的类库DLL. myClass.DLL,我在Test.exe应用程序中引用了它,该程序正在运行,问题是在安装和部署时,我希望myClass.DLL位于系统文件夹中,而Test.exe保留在应用程序中文件夹,但是当我运行它时...出现错误信息.
创建表单时发生错误.有关详细信息,请参见Exception.InnerException.错误是:无法加载文件或程序集" myClass,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null"或其依赖项之一.系统找不到指定的文件."
顺便说一句,我在myClass.dll的属性窗口中将System = True设置为
谢谢.
Hi! guys, this is the case, I''ve made a class library DLL ex. myClass.DLL and I referenced it in my Test.exe app, the program is running, the problem is that when It comes to Setup and deployment I want myClass.DLL to be in system folder, and the Test.exe stays in the Application Folder, but when I run it... there''s an error saying.
"An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly ''myClass, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'' or one of its dependencies. The system cannot find the file specified".
by the way I set the System = True in the property window in myClass.dll
thanks.
推荐答案
您需要阅读此如何运行时定位程序集 [ ^ ]
永远不要将程序集放在系统文件夹中.
You need to read this How the Runtime Locates Assemblies[^]
Placing your assembly in the system folder is NOT what you should do, ever.
这篇关于类库到系统文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!