System.Windows.Input.ICommand接口已经从.NETC4类型转发,从PresentationCore.dll到System.dll。我有两个问题:
答案 0 :(得分:1)
您必须明确处理它。
例如,查找可能存在于diff程序集中的Action
。
var msCoreLibDefinition = assemblyResolver.Resolve("mscorlib");
var msCoreTypes = msCoreLibDefinition.MainModule.Types;
var systemDefinition = assemblyResolver.Resolve("System");
var systemTypes = systemDefinition.MainModule.Types;
var actionDefinition = msCoreTypes.FirstOrDefault(x => x.Name == "Action");
if (actionDefinition == null)
{
actionDefinition = systemTypes.First(x => x.Name == "Action");
}