A troubleshooting solution for Zlib. Portable errors in Google Review, googlecodereview

Source: Internet
Author: User

A troubleshooting solution for Zlib. Portable errors in Google Review, googlecodereview

The error message is as follows:

An exception of the "System. IO. FileNotFoundException" type occurs in Google. Apis. dll, but not in user code.

Other information: the file cannot be loaded, the Assembly "Zlib. Portable, Version = 1.11.0.0, Culture = neutral, PublicKeyToken = 431cba815f6a8b5b", or one of its dependencies. The system cannot find the specified file.

The project already contains Zlib. Portable. dll. Check the file attributes and confirm that the version number is consistent.

Find https://github.com/google/google-api-dotnet-client-samplescode and download it.

Use Visual Studio to open the downloaded project. Click "Project-" to manage the NuGet package. A message is displayed, indicating that the dependent DLL file is automatically updated. The update is complete.

In this case, we need Zlib. portable. dll can be displayed in the folder: google-api-dotnet-client-samples-master \ packages \ Zlib. portable. signed.1.11.0 \ lib \ portable-net4 + sl5 + wp8 + win8 + wpa81 + MonoTouch + MonoAndroid

Open Windows PowerShell and use the following command to compare the newly generated Zlib. Portable. dll and Zlib. Portable. dll in the original project:

1 ([system.reflection.assembly]::loadfile("D:\Zlib.Portable.dll")).FullName2 3 Zlib.Portable, Version=1.11.0.0, Culture=neutral, PublicKeyToken=431cba815f6a8b5b4 5  ([system.reflection.assembly]::loadfile("D:\Web\bin\Zlib.Portable.dll")).FullName6 7 Zlib.Portable, Version=1.11.0.0, Culture=neutral, PublicKeyToken=null

 

The difference is that the latter PublicKeyToken = null is not the former. The reason is probably clear, and dll without strong signature is no longer usable, google Review API imposes more strict restrictions on this, which is the cause of the error.

Replace the newly generated Zlib. Portable. dll with the server, and the error message disappears! Restore to normal

 

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.