耶稣,克里希纳,佛陀!
我已经迁移到 EntLib 5.0,但是ISymmetricCryptoProvider
不再识别类似的类。有趣的是,Data、Logging 和其他块正在正常编译。
这是有问题的类:
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;//-->it's not working anymore
using Microsoft.Practices.EnterpriseLibrary.Security.Cryptography;//-->it's not working anymore
namespace MyClassLibrary.Security.EnterpriseLibrary
{
public sealed class Crypto
{
public static ISymmetricCryptoProvider MyProvider
{
get
{
//IConfigurationSource is not recognized either, neither SystemConfigurationSource
IConfigurationSource cs = new SystemConfigurationSource();
SymmetricCryptoProviderFactory scpf = new SymmetricCryptoProviderFactory(cs);
ISymmetricCryptoProvider p = scpf.CreateDefault();
return p;
}
}
参考资料在项目上也很好。我真的不知道为什么这个特定的项目会在 VS2010 上造成太多麻烦!旧的引用被删除,项目被清理,重建,但无法编译:-(
参考文献是:
Microsoft.Practices.EnterpriseLibrary.Common
Microsoft.Practices.EnterpriseLibrary.Logging
Microsoft.Practices.EnterpriseLibrary.Logging.Database
Microsoft.Practices.EnterpriseLibrary.Security
Microsoft.Practices.EnterpriseLibrary.Security.Cryptography
为什么有些命名空间可以找到而有些则不能?