내 코드에서 이것을 가지고 : 내 프로그램을 디버깅 할 때Assembly.GetTypes는()
Assembly assembly = Assembly.LoadFile(dllFile);
//dllFile has the correct value of a path of a .dll file
foreach (Type type in assembly.GetTypes()) {...}
, 모든 것이 잘 작동합니다. 내 프로그램 용으로 exe 파일을 만들면 assembly.GetTypes() 코드가 실행되고 실행이 중지됩니다. 무엇이 assembly.GetTypes()가 내가 exe를 사용할 때 디버깅 할 때 다르게 작동합니까?
다음을 살펴보십시오. http://social.msdn.microsoft.com/Forums/en/US/netfxbcl/thread/3bdaf65c-520c-4a1a-a825-fc2ca2957bf3/ – Prisoner
두 경우의 경로는 무엇입니까? – V4Vendetta
dllFile의 정확한 값을 표시하십시오. 하드 코드 한 경우 디버그 모드에서 디버그 폴더의 릴리스 폴더 – Serghei