SilverLight project compilation error message: System. Windows not loaded

Source: Internet
Author: User
Tags silverlight

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

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.