Skip to content
  • Jared Moore's avatar
    SQL: Ability to reference both Hyak-based and AutoRest-based SDK (#3664) · 197bfbf4
    Jared Moore authored
    * Added old Hyak-based SDK source code.
    
    Hyak-based SDK (Microsoft.Azure.Management.Sql 0.XX.0-prerelease) and
    AutoRest-based SDK (Microsoft.Azure.Management.Sql 1.Y.0-preview) cannot
    both be referenced in a single assembly because they have the same
    assembly name and same namespace. In order to migrate from one to the
    other, we are adding Hyak-based SDK source code directly to the PowerShell
    repo where it is rebuilt with a different namespace and assembly name,
    therefore allowing both SDKs to be referenced.
    
    * Modified legacy SDK csproj for successful build.
    
    In the previous commit I had copied the SqlManagement.csproj from
    azure-sdk-for-net. It did not build successfully due to project
    imports/references.
    
    In this change, SqlManagement.csproj is modified so that it builds
    successfully. The assembly name is changed to
    Microsoft.Azure.Management.Sql.Legacy.
    
    I also removed duplicate MSSharedLibKey.snk files from other Sql projects.
    
    * Modified Sql projects to reference LegacySdk
    
    Using project reference instead of nuget reference.
    
    * Add script to find/replace namespace in LegacySdk
    
    LegacySdk (Hyak-based) and latest sdk (AutoRest-based) each have types
    that have the same fullname (namespace and type name) as one another). In
    order to reference these types without ambiguity, LegacySdk needs to
    have a different namespace. This script does a dumb find/replace on this
    namespace.
    
    * Ran namespace script.
    
    This changes the namespace from Microsoft.Azure.Management.Sql to
    Microsoft.Azure.Management.Sql.Legacy.
    
    This was run on both the legacy sdk itself and the cmdlets that reference
    it.
    
    * Fixed ServerUpgrade scenario test.
    
    This test was broken by the previous commit. Separated this change from
    the previous so that this manual edit is reviewable.
    
    * Updated cmdlet projects to reference new sdk.
    
    Now that legacy sdk changes are complete, cmdlet projects can reference
    the new AutoRest-based sdk without conflict.
    
    * Enable scenario tests to create old and new client
    
    * Update server cmdlets to use new sdk.
    
    There are upcoming changes to server api in new sdk and everything depends
    on it, so it's a good first proof of concept candidate for migration.
    
    * Update to Management.Sql v1.2.0-preview
    
    * Added breaking change exception.
    
    The affected types have been renamed but are functionally identical.
    
    * Fixed breaking change log
    
    * Removed comments in SqlManagement.csproj
    
    * Updated LegacySdk assembly version
    197bfbf4