问题描述
我有问题.我正在从MTaulty的视频中学习: http://channel9.msdn.com/blogs/mtaulty/prism--silverlight-part-2-dependency-injection-with-unity .而且我对他在18:00分钟创建的 .config 文件有问题.不可能看到
I have a problem. I'm learning from MTaulty's video: http://channel9.msdn.com/blogs/mtaulty/prism--silverlight-part-2-dependency-injection-with-unity. And I have a problem with .config file which he creates at 18:00 min. There is no possibility to see what is in
<section type=".."
我写道:
type="Microsoft.Practises.Unity.Configuration.UnityConfigurationSection, Microsoft.Practises.Unity.Configuration" />
,但是它不起作用.我不知道怎么了.我有一个错误,VisualStudio无法加载文件"Microsoft.Practises.Unity.Configuration"并找到文件.
but it does not work. I don't have idea what is wrong. I have a mistake that VisualStudio can't load file'Microsoft.Practises.Unity.Configuration and find a file.
感谢帮助!
推荐答案
如果要通过配置文件指定模块,则 MSDN上的棱镜指南很好地解释了这一点.
If you want to specify modules via config file the Prism Guide on MSDN does a good job explaining that.
《指南》中的语录
<?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="ModularityWithUnity.Desktop.ModuleE.dll" moduleType="ModularityWithUnity.Desktop.ModuleE, ModularityWithUnity.Desktop.ModuleE, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" moduleName="ModuleE" startupLoaded="false" />
<module assemblyFile="ModularityWithUnity.Desktop.ModuleF.dll" moduleType="ModularityWithUnity.Desktop.ModuleF, ModularityWithUnity.Desktop.ModuleF, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" moduleName="ModuleF" startupLoaded="false">
<dependencies>
<dependency moduleName="ModuleE"/>
</dependencies>
</module>
</modules>
</configuration>
这篇关于App.config文件和节类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!