我正在尝试使用配置文件加载模块,但不断收到以下异常。
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 名称、命名空间和类型名称,甚至从头开始重新创建项目,但错误仍然出现。请帮我解决这个问题,因为我已经被困了几个小时了。谢谢。