白色UI自动化C#加载白色。核心程序集失败

白色UI自动化C#加载白色。核心程序集失败,c#,ui-automation,white-framework,C#,Ui Automation,White Framework,我尝试运行一个简单的示例来启动Windows计算器并执行以下操作: 上面的Saldy链接很旧,因此我改编了另一个示例中的代码: 我的简单代码现在看起来像: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web; using White.Core; using White.Core.UIItems; using White.Core.UIIte

我尝试运行一个简单的示例来启动Windows计算器并执行以下操作:

上面的Saldy链接很旧,因此我改编了另一个示例中的代码:

我的简单代码现在看起来像:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using White.Core;
using White.Core.UIItems;
using White.Core.UIItems.WindowItems;
using White.Core.UIItems.WindowStripControls;
using White.Core.UIItems.MenuItems;
using White.Core.UIItems.TreeItems;
using White.Core.UIItems.Finders;

namespace TestWhiteCalculator
{
    class Program
    {
        static void Main(string[] args)
        {
            Application manager = Application.Launch(@"C:\Windows\system32\calc.exe");

            Window mainWindow = manager.GetWindow("Rechner");
        }
    }
}
我还添加了
WhiteCore.dll
引用

我仍然得到一个错误:

警告:无法解析引用的程序集“White.Core”,因为它依赖于“System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”,该程序集不在当前目标框架中。NETFramework,Version=v4.0,Profile=Client”。请删除对不在目标框架中的程序集的引用,或考虑对项目进行重定向。

因此,加载
White.Core
时出现问题,因为缺少
System.Web
引用

有什么想法吗?这是我的.NET安装的问题吗


找到了一个解决方案:


您必须将.NET framework配置文件从.NET 4.0客户端更改为.NET 4.0(完整)。

我认为您需要在项目引用中添加对
System.Web.dll的引用。如果您找不到,那么您可能不得不这样做。

jep框架就是问题所在