加载时没有指定路径么?
试下
用MyArx.DllPAth获取当前dll的路径
-
- using System.Reflection;
- namespace TlsCad
- {
- class MyArx
- {
- public static Assembly CurAssembly
- {
- get { return (new MyArx()).GetType().Assembly; }
- }
- public static string Location
- {
- get { return CurAssembly.Location; }
- }
- public static string DllPath
- {
- get
- {
- string s = Location;
- return s.Substring(0, s.LastIndexOf(""));
- }
- }
- }
- }
|