New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new OData Client Code Gen for VS2017 #987

Merged
merged 17 commits into from Jan 29, 2018

Conversation

Projects
None yet
5 participants
@AlanWong-MS
Contributor

AlanWong-MS commented Nov 4, 2017

Issues

This PR addresses #985 in that the current OData Client Code Gen doesn't support VS2017. It is also related to #731.

Description

This PR creates a new project to produce a VS2017-compatible VSIX for OData Client Code Gen, ODataT4ItemTemplate.csproj. OData.CodeGen.sln has been updated to include only the new project and all previous projects in that solution have been moved to OData.Tests.E2E.sln.

With this update, OData Client Code Gen will now build alongside the ODL binaries and when released, will have the latest code changes. The size of the package has also been reduced from ~15mb to 1mb.

To update the version number of the VSIX, one needs to make the change in the manifest file: src/CodeGen/ODataT4ItemTemplate/source.extension.vsixmanifest. Change the Version attribute in the Identity tag.

Checklist (Uncheck if it is not completed)

  • Test cases added (N/A)
  • Build and test with one-click build and test script passed

Additional work necessary

N/A

@AlanWong-MS AlanWong-MS requested a review from robward-ms Nov 4, 2017

@Nepomuceno

This comment has been minimized.

Nepomuceno commented Dec 27, 2017

I have been trough a lot of problems with this specially with a combination of .net core and vs2017

@AlanWong-MS

This comment has been minimized.

Contributor

AlanWong-MS commented Jan 23, 2018

Working on this now.

A note to self: the commit "Reverting an accidental change / b2aa426" is a good state in which we maintain the same build pattern as the one we have for VS2015. Subsequent commits are experimental until otherwise noted.

AlanWong-MS added some commits Jan 23, 2018

Updating VSIX to use non-portable version of OData Client as the port…
…able version was introducing regressions due to changes in API surface
The OData.CodeGen.sln was overwriting the ODL binaries prepared from …
…a previous process so disabling the building of ODL in the solution. Other attempts included using the build flag /p:BuildProjectReferences=false and specifically building the csproj, but either they were ineffective or required too many changes. A caveat to this approach is that OData.Net45.sln must be built first before building the OData.CodeGen.sln.

@AlanWong-MS AlanWong-MS requested a review from xuzhg Jan 25, 2018

@AlanWong-MS

This comment has been minimized.

Contributor

AlanWong-MS commented Jan 25, 2018

The commit "Fixing E2E tests / cb43be2" marks a stable checkpoint where the size of the VSIX package has been reduced from ~15mb to 1mb and installs properly on VS2017. A quick smoke test also indicates that it works functionally.

@robertmclaws

This comment has been minimized.

Collaborator

robertmclaws commented Jan 27, 2018

Is this being published to VSIXGallery.com so it can be tested externally? The last version I see there is from two months ago...

@AlanWong-MS

This comment has been minimized.

Contributor

AlanWong-MS commented Jan 29, 2018

Yes, we should probably do some quick tests on a package with the considerable amount of changes I've recently made. I'll push a new one to the gallery--generating a package now. Thanks for the reminder!

@@ -172,6 +172,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Test.OData.Servic
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceWrapperApp", "..\test\EndToEndTests\Services\ServiceWrapperApp\ServiceWrapperApp.csproj", "{333077F2-0DBA-42A1-A5E1-E86361D96074}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "T4CrossPlatformTests", "..\test\FunctionalTests\Tests\DataServices\UnitTests\DesignT4CrossPlatformTests\CSharp\T4CrossPlatformTests.csproj", "{65DCD663-02DB-4E45-B41E-C7B7D3B11871}"

This comment has been minimized.

@robward-ms

robward-ms Jan 29, 2018

Contributor

Seems like more projects were removed from the CodeGen sln than were added here.

This comment has been minimized.

@AlanWong-MS

AlanWong-MS Jan 29, 2018

Contributor

The other files were already part of the E2E solution with the exception of the Windows Store test project, which I'm going to remove now as we're publishing to the Marketplace and not the Store.

@AlanWong-MS AlanWong-MS merged commit 02d3279 into OData:master Jan 29, 2018

1 of 2 checks passed

continuous-integration/vsts The build trigger has fired.
Details
license/cla All CLA requirements met.
Details

mikepizzo added a commit to mikepizzo/odata.net that referenced this pull request Jan 30, 2018

Adding new OData Client Code Gen for VS2017 (OData#987)
- Adding VSIX files for OData Code Generator VS extension. Migrating OData.CodeGen.sln to VS2017
- Adding new VSIX project for OData Client Code Gen for VS2017
- Reworking the CodeGen solution to use new VSIX project format. Migrating legacy tests to the E2E solution. Removing a Windows Store test project as we're publishing to the Visual Studio Marketplace and not Windows Store now
- Reducing the size of the VSIX package from ~15mb to 1mb by referencing release binaries as opposed to debug ones and removing embedded NuGet packages. The solution references the ODL projects, allowing the VSIX project to reference the latest versions of ODL during build time. The ODL release builds are disabled within OData.CodeGen.sln because the build process of the solution was overwriting the ODL binaries prepared from a previous build process. Other attempts included using the build flag /p:BuildProjectReferences=false and specifically building the csproj, but either they were ineffective or required too many changes. A caveat to this approach is that OData.Net45.sln must be built first before building the OData.CodeGen.sln.
- Updating README.md and build.ps1 to reflect changes
- Updating test cases to remove hardcoded version numbers
- Updating ItemTemplates to be dummy files.
@Mine02C4

This comment has been minimized.

Mine02C4 commented Mar 1, 2018

Where do you distribute this extension?
Building by yourself does not work with certificate error.

@AlanWong-MS

This comment has been minimized.

Contributor

AlanWong-MS commented Mar 1, 2018

We have nightly runs of the extension on MyGet. We haven't released a new version yet due to some complications but the next ODL release should come with a new VSIX package. You can check #731 for latest updates.

If the certificate error persists, can you please open a new issue for it? I can help take a look.

@AlanWong-MS AlanWong-MS deleted the AlanWong-MS:clientcodegen7x branch Mar 12, 2018

@AlanWong-MS AlanWong-MS restored the AlanWong-MS:clientcodegen7x branch Mar 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment