-
Notifications
You must be signed in to change notification settings - Fork 4k
Update AutoMapper to 6.0.2 #4679
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
Conversation
Building packages job: http://azuresdkci.cloudapp.net/job/posh-pack/3/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of questiosn about AutoMapper.Net4 - it looks liek this was removed form the wxi file everywhere, but noted at least one palce there is still a reference. Want to make sure we understand why.
@@ -132,9 +132,6 @@ | |||
<Component Id="cmpBEA6E3263480C18705DC2E3B15E3C1CF" Guid="*"> | |||
<File Id="fil7E95F218EFC39408F9F2DB3FD01A124C" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.ApiManagement\AutoMapper.dll" /> | |||
</Component> | |||
<Component Id="cmp957D146263F021CE3EF1CBADBF06D2C4" Guid="*"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we don't need this file anymore?
</Reference> | ||
<Reference Include="AutoMapper.Net4, Version=3.1.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL"> | ||
<HintPath>..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.Net4.dll</HintPath> | ||
<Reference Include="AutoMapper.Net4, Version=6.0.2.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like AutoMapper.Net4 is still used in some circumstances
@cormacpayne |
@blueww Hey Wei, the bulk of the Storage code changed is in the Currently, AutoMapper is being used statically throughout the modules, which is why we believe these issues with "unsupported mappings" are popping up - the correct mappings may not have been instantiated by the time the mapper is used. This PR updates the version of AutoMapper used to 6.0.2, which deprecates the support of a static mapper, and we define a specific mapper to be used for each module. This ensures that every module has their own mapper, every call to Now, rather than calling |
…hell into automapper-fix # Conflicts: # src/ResourceManager/Compute/Commands.Compute/Generated/Models/ComputeAutoMapperProfile.cs
…hell into automapper-fix # Conflicts: # src/ResourceManager/Network/Commands.Network/RouteTable/NewAzureRouteTableCommand.cs # src/ResourceManager/Network/Commands.Network/RouteTable/RouteTableBaseCmdlet.cs # src/ResourceManager/Network/Commands.Network/RouteTable/SetAzureRouteTableCommand.cs
@azuresdkci test this please |
…nto automapper-fix
@azuresdkci test this please |
…nto automapper-fix # Conflicts: # src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/ApiManagementClient.cs
Approved offline pending compute signoff
Received sign-off from Compute and Network that this does not break existing scenarios. |
Description
Initial attempt at fixing issue #4294 by bumping the version of
AutoMapper
used and adopting a singleton pattern with the new version that will prevent the mapper from being populated every time a cmdlet is executed.This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines