One of the guys hit this strange problem all of a sudden. I'm not sure what changed but it seemed isolated to his machine.
Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
We removed the silverlight application and the problem remained, it seemed to be something trying to reference the silverlight assembly outside of the silverlight project.
The workaround was to add the System.Windows.dll to the GAC by using the gacutil command line tool from the Visual Studio Command line. (make sure you run it as administrator).
The command was:
gacutil /i "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Windows.dll"
After that it all worked normally. If anyone knows what specifically caused this please let me know.
Thursday, July 8, 2010
Subscribe to:
Posts (Atom)
