A beginner experienced the following error message: after a long struggle, I finally got it done. I almost re-installed Visual Studio. I recorded it to celebrate. Error message:
The referenced assembly cannot be parsed. Check the reference assembly. Failed to 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 specified file.
Go to the Silverlight installation directory and find X: \ Program Files (x86) \ Microsoft Silverlight \ 4.1.10111.0 \ System. Windows. dll
Call gacutil.exe to add it to the global assembly cache. If not, add System. Core. dll together to the cache. (Please modify according to the specific SilverLight Version)
I am relatively lazy. The specific method is to execute the following batch processing files (stored as bat files, and the specific path is modified as needed ):
@ Set gacutil = "C: \ Program Files (x86) \ Microsoft SDKs \ Windows \ v7.0A \ Bin \ NETFX 4.0 Tools \ gacutil.exe"
Echo Install the dll into GAC
% GACUTIL %-if "C: \ Program Files (x86) \ Microsoft Silverlight \ 4.1.10111.0 \ System. Core. dll"
% GACUTIL %-if "C: \ Program Files (x86) \ Microsoft Silverlight \ 4.1.10111.0 \ System. Windows. dll"
Pause
I want to add a description. I searched Baidu for a long time and did not find a proper answer many times. I finally found a solution on google.
Http://www.nivisec.com/2009/06/could-not-load-file-or-assembly.html