2012-08-11 5 views
0

구성 파일을 사용하여 모듈을로드하려고하지만 다음 예외가 계속 발생합니다.구성 파일을 사용하여 모듈을로드 할 수 없음

An exception occurred while initializing module 'HelloWorld'. 
- The exception message was: The method or operation is not implemented. 
- The Assembly that the module was trying to be loaded from was:HelloWorld, Version=1.0.0.0, 
Culture=neutral, PublicKeyToken=null 
Check the InnerException property of the exception for more information. If the exception 
occurred while creating an object in a DI container, you can exception.GetRootException() 
to help locate the root cause of the problem. 

다음 App.config 파일이 있습니다.

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <configSections> 
    <section name="modules" type="Microsoft.Practices.Prism.Modularity.ModulesConfigurationSection, Microsoft.Practices.Prism"/> 
    </configSections> 

    <modules> 
    <module assemblyFile="HelloWorld.dll" moduleType="HelloWorld.HelloWorldModule, HelloWorld, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" moduleName="HelloWorld" startupLoaded="true" /> 
    </modules> 
</configuration> 

나는 두 번 DLL 이름, 네임 스페이스 및 유형 이름을 확인하고 난 처음부터 프로젝트를 다시 있지만 오류는 여전히 표시됩니다. 제가 몇 시간 동안 이미 갇혀있는 동안이 문제에 대해 도와주세요. 감사.

답변

0

내 문제의 해결책을 찾았습니다. 이 오류는 모듈의 Initialize() 메서드가 아직 구현되지 않은 경우 나타납니다.

public class HelloWorldModule : IModule 
{ 
    public void Initialize() 
    { 
     throw new NotImplementedException(); 
    } 
} 

그러나 디버거가 NotImplementedException이 아닌 다른 예외를 throw해야하므로 여전히 위풍 당당합니다.

관련 문제