开发者

DataForm doesn't work in Silverlight 5 [closed]

开发者 https://www.devze.com 2023-03-04 04:19 出处:网络
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time,or an extraordinarily narrow situation that is not generally applic
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 10 years ago.

Reproduction:

  1. Create a Silverlight project
  2. Turn it to version 5
  3. Add references to the Silverlight Toolkit (using NuGet or direct)
  4. Add a DataForm to your page
  5. This is the exception the DataForm constructor throws:

    {System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Controls.Data.Input, Version=2.0.5.0, Culture=neutral, PublicKeyToke开发者_运维技巧n=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. Turn back to Silverlight 4
  7. Now everything is cool again

Weird note: it does work in the VS/Exp. Blend 5 designers

Any ideas?? Workaround???


Found a very strange workaround: After I returned the SL version to 4, and re-returned it to 5, everything works! (?!?)

Anyway I'm sure recompiling the source-code of the SL TK targeting SL5 will help anyway.


I could not resolve this problem, also taking a project that was SL version 4 then migrating to SL version 5 and trying to add a DataForm. Even though I referenced the December 2011 Silverlight 5 Toolkit, and I added a proper reference to the SL5 DataForm, because of the presence of SL version 4 assemblies I get an error.

Not sure how you can 're-return' and 'return' as suggested in the workaround but for now I think anybody migrating from SL 4 to SL5 and trying to add a dataform will experience this problem. Best to either start from a completely new SL5 project, or, forget about using dataform with a SL4 solution migrated to SL5?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号