Installing OData v4 Client Code Generator in Visual Studio 2019

百般思念 提交于 2019-12-05 05:29:53

Since Rahul's download link is expired (and according to the comment of Mostafa, it was missing a feature), I reupload a working version of the extension for Visual Studio 2019:

https://gofile.io/?c=kXvXoR

Some notes about upgrading the vsix file:

1) If you unzip the file, edit the contents (actually even without editing anything), rezip it and finally rename it vsix, it does NOT work. You have to edit the file contents of vsix directly with a program like 7zip.

2) To edit the file contents, I used the following link: https://github.com/OData/odata.net/issues/1485
I copy the content changes here again:

extension.vsixmanifest

  <Installation>
    <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[14.0, 17.0)" />
  </Installation>
  <Prerequisites>
    <Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,17.0)" DisplayName="Visual Studio core editor" />
  </Prerequisites>

manifest.json

"dependencies": { "Microsoft.VisualStudio.Component.CoreEditor": "[15.0,17.0)" }

catalog.json

    "dependencies": {
        "Microsoft.VisualStudio.Component.CoreEditor": "[15.0,17.0)"
    },

3) After creating the proxy/client, you will notice that the Reference file does not compile because there are some API changes in "Microsoft.OData.Edm":
- EdmxReader has been renamed to CsdlReader
- For Date type just remove .Library from namespace prefixes. (rename all occurences)

Rahul

Currently, OData v4 Client Code Generator is not available for VS 2019 in VS Marketplace. However, you can try the following:

Method 1: Exporting your VS 2017 extension to VS 2019, using extension manager extension.

How to: Using Extension Manager 2017

Method 2: You can build the VSIX extension targeting VS 2019.

How to: Updates to .vsixmanifest

Project Source: https://github.com/OData/odata.net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!