Add & # 8594; REST Api Client Throws an exception. How to fix it?

After selecting Add and REST API Client, VS throws an exception (I donโ€™t know why this parameter occurs so often). I do not understand. How to fix it? Below you can see the VS2015 environment and screenshots.

enter image description here enter image description here

+5
source share
2 answers

According to the error, the RestartGetway method is not implemented. So,

  • please check your Azure REST API to make sure all methods in your API are implemented first.
  • You can try adding your REST API to another computer to make sure that this problem is related to the REST API or Visual Studio itself.

And I also tried to add the REST API to my Azure UWP application, this is successful on my side. I am using Visual Studio 2015 with Update 3. The version must be 14.0.25431.01.

  1. Check if you have updates for Visual Studio 2015 from

Tools โ†’ Extensions and Updates โ†’ Updates.

In addition, all versions of Azure-related tools are listed below.

  1. Please make sure that all of these tools on your computer match mine.
  • Microsoft Azure Mobile Service Tools 1.4
  • Azure App Service Tools v2.8.1
  • Common Azure 1.8 Tools
+1
source

It is difficult to give an unambiguous answer to this question if the problem is not reproduced locally, but here are a few steps that will help you investigate and potentially fix your problem:

Explore:

  • This seems to be the problem with the Visual Studio Azure builds you have, namely Microsoft.VisualStudio.web.WindowsAzure.Impl
  • The assembly must exist in this place: C: \ Program Files (x86) \ Microsoft Visual Studio 14.0 \ Common7 \ IDE \ Extensions \ Microsoft \ Web Tools Azure

  • Download a .NET reflector tool such as ILSpy.exe from http://ilspy.net/

  • Download the assembly to ILSpy and go to the Microsoft.VisualStudio.Web.WindowsAzure.APIApps.Impl namespace, then expand VSAzureAPIService , you should find the RestartGateway method.

  • If you cannot find it, then this is your problem, and if you do, you will see the code that throws this exception.

Fix

Assuming we are seeing a problem with this version of the DLL, you can take the following steps to solve it:

  • Back up and delete the DLL "Microsoft.VisualStudio.Web.WindowsAzure.APIApps.Impl"

  • Uninstall / reinstall or restore the MS Azure SDK, you can download it directly from VS or from here: https://www.visualstudio.com/vs/azure-tools/

  • Make sure you have the DLL in the right folder, you can also look at the method again to make sure it is fixed.

If this works for you or has taken the next steps to fix it, please share and good luck!

+1
source

Source: https://habr.com/ru/post/1262572/


All Articles