2

再生产:

  1. 创建 Silverlight 项目
  2. 将其转换为版本 5
  3. 添加对 Silverlight 工具包的引用(使用 NuGet 或直接)
  4. 将 DataForm 添加到您的页面
  5. 这是 DataForm 构造函数抛出的异常:
    {System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Controls.Data.Input, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. [IO.FileName_Name] Arguments: System.Windows.Controls.Data.Input, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.0.60401.00&File=mscorlib.dll&Key=IO.FileName_Name at System.Windows.Controls.DataForm..ctor()}
  6. 转回 Silverlight 4
  7. 现在一切都变酷了

奇怪的注意:它确实在 VS/Exp 中工作。融合 5 位设计师

有任何想法吗??解决方法???

4

2 回答 2

0

发现了一个很奇怪的解决方法:我把SL版本恢复到4后,又重新恢复到5,一切正常!(?!?)

无论如何,我确信重新编译针对 SL5 的 SL TK 的源代码无论如何都会有所帮助。

于 2011-05-11T21:48:18.573 回答
0

我无法解决这个问题,还采用了一个 SL 版本 4 的项目,然后迁移到 SL 版本 5 并尝试添加一个 DataForm。尽管我引用了 2011 年 12 月的 Silverlight 5 Toolkit,并且我添加了对 SL5 DataForm 的正确引用,但由于存在 SL 版本 4 程序集,我得到了一个错误。

不确定如何按照解决方法中的建议“重新返回”和“返回”,但现在我认为任何从 SL 4 迁移到 SL5 并尝试添加数据表单的人都会遇到这个问题。最好从一个全新的 SL5 项目开始,或者忘记使用迁移到 SL5 的 SL4 解决方案的数据表单?

于 2011-12-11T19:32:25.820 回答