最近工作需要,学习WPF编程和Prism框架。
一些典型错误记录下。
Error 1 The non-generic method 'Microsoft.Practices.Unity.IUnityContainer.RegisterInstance(System.Type, string, object, Microsoft.Practices.Unity.LifetimeManager)' cannot be used with type arguments d:\lzyCSharp\test\SilverlightApplication1\SilverlightApplication1\PrismStarterBootstrapper.cs 60 28 SilverlightApplication1
错误提示的是什么的不能泛型……这是一种典型的没有找出真正原因的错误提示!其实是缺乏程序集的引用。
添加 using Microsoft.Practices.Unity; 就好了。
给出别人遇到的相似问题吧:
http://blog.csdn.net/JeamKing/article/details/5773660 The type List is not generic
The non-generic type 'System.Collections.IEnumerable' cannot be used with type arguments
http://stackoverflow.com/questions/6931494/the-non-generic-type-system-collections-ienumerable-cannot-be-used-with-type-a
the non-generic type 'system.collections.ienumerable' cannot be used with type arguments
http://naspinski.net/post/The-non-generic-type-SystemCollectionsIEnumerable-cannot-be-used-with-type-arguments.aspx