Skip to content

Add Common.Dependencies project #3734

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

Merged
merged 14 commits into from
Jul 31, 2017

Conversation

cormacpayne
Copy link
Member

@cormacpayne cormacpayne commented Apr 5, 2017

Description

Fix for issue #3435 and #3437

Add Common.Dependencies project, which will contain references to common libraries used throughout the modules.

Remove dependencies on cmdlet projects for ARM projects.


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

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.
  • The pull request does not introduce breaking changes (unless a major version change occurs in the assembly and module).

Testing Guidelines

  • Pull request includes test coverage for the included changes.
  • PowerShell scripts used in tests should do any necessary setup as part of the test or suite setup, and should not use hard-coded values for locations or existing resources.

Cmdlet Signature Guidelines

  • New cmdlets that make changes or have side effects should implement ShouldProcess and have SupportShouldProcess=true specified in the cmdlet attribute. You can find more information on ShouldProcess here.
  • Cmdlet specifies OutputType attribute if any output is produced - if the cmdlet produces no output, it should implement a PassThru parameter.

Cmdlet Parameter Guidelines

  • Parameter types should not expose types from the management library - complex parameter types should be defined in the module.
  • Complex parameter types are discouraged - a parameter type should be simple types as often as possible. If complex types are used, they should be shallow and easily creatable from a constructor or another cmdlet.
  • Cmdlet parameter sets should be mutually exclusive - each parameter set must have at least one mandatory parameter not in other parameter sets.

@cormacpayne
Copy link
Member Author

@azuresdkci test this please

@cormacpayne cormacpayne changed the title [DO NOT MERGE] Add Common.Dependencies project Add Common.Dependencies project Apr 14, 2017
@cormacpayne cormacpayne assigned markcowl and unassigned cormacpayne Apr 14, 2017
@cormacpayne cormacpayne force-pushed the common-dependencies branch 2 times, most recently from 5646803 to af2ccf9 Compare April 19, 2017 23:43
// ----------------------------------------------------------------------------------


namespace Microsoft.Azure.Graph.RBAC.ActiveDirectory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make the api version part of the namespace - this will make it easier to include a new version

// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Commands.Common.GraphRBAC")]
[assembly: AssemblyDescription("")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should fill these out

// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.Internal.Network
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, we should add the api-version to the namsepace

// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Common.Dependencies")]
[assembly: AssemblyDescription("")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should fill out the details

@@ -1,18 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove files with no depednencies.

@@ -12,7 +12,8 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.Network;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra space

@cormacpayne
Copy link
Member Author

@markcowl
Copy link
Member

@cormacpayne cormacpayne force-pushed the common-dependencies branch from a906a69 to 5c6864f Compare July 25, 2017 17:14
…nto common-dependencies

# Conflicts:
#	src/ResourceManager/Network/Commands.Network/Commands.Network.csproj
#	src/ResourceManager/Network/Commands.Network/packages.config
@cormacpayne
Copy link
Member Author

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Commands.Common.Authorization")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make these match the values in other common assemblies (particularly the copyright, company sruff). Liek this: https://github.com/Azure/azure-powershell/blob/preview/src/Common/Commands.Common.Authentication.Abstractions/Properties/AssemblyInfo.cs

<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.3" targetFramework="net452" />
<package id="Microsoft.Rest.ClientRuntime" version="2.3.5" targetFramework="net452" />
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.5" targetFramework="net452" />
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.2.9-preview" targetFramework="net452" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not need this

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.3" targetFramework="net452" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove dependencies on ADAL and Azure.Authentication packages

@@ -103,7 +104,7 @@
<XUnitTests Include=".\src\ResourceManager\Resources\Commands.Resources.Test\bin\Debug\Microsoft.Azure.Commands.Resources.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\Scheduler\Commands.Scheduler.Test\bin\Debug\Microsoft.Azure.Commands.Scheduler.Test.dll"/>
<!-- <XUnitTests Include=".\src\ResourceManager\ServerManagement\Commands.ServerManagement.Test\bin\Debug\Microsoft.Azure.Commands.ServerManagement.Test.dll"/> -->
<!-- <XUnitTests Include=".\src\ResourceManager\ServiceFabric\Commands.ServiceFabric.Test\bin\Debug\Microsoft.Azure.Commands.ServiceFabric.Test.dll"/> -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's leave this around so the service team can uncomment it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markcowl I removed this line because ServiceFabric already defined their test dll above (below KeyVault). I will move the uncommented line below ServiceBus

<Component Id="cmpD85C4D043B5D7961FFDBBB38A14A782E" Guid="*">
<File Id="filBFB9D3DDC47B17AEBD9413E4DDDA77CC" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Azure.AnalysisServices\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" />
</Component>
<Component Id="cmpEAF41C675624E5CC949D2BC960518696" Guid="*">
<File Id="fil42FA267C2555527DAB21C3F75040CEA5" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Azure.AnalysisServices\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll" />
</Component>
<Component Id="cmpDEED295F765F387FFB9382664C481366" Guid="*">
<File Id="filFF02AF539455FC759869BFE97EEE1BE1" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Azure.AnalysisServices\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure to regen after the suggested changes

<HintPath>$(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.Azure.3.3.5\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove azure.authentication, and two IdentityModel libraries - these should eb only in the authentication common libraires.

</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Spatial">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Spatial is part of the Microsoft.WindowsAzure.Storage dependency chain. We cna move this out of here

…nto common-dependencies

# Conflicts:
#	src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Commands.AnalysisServices.csproj
#	src/ResourceManager/AnalysisServices/Commands.AnalysisServices/packages.config
@cormacpayne
Copy link
Member Author

NuGet.config Outdated
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="powershell-core" value="https://powershell.myget.org/F/powershell-core/api/v3/index.json" />
</packageSources>
<disabledPackageSources>
<add key="local-feed" value="true" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep in local feed if possible

markcowl
markcowl previously approved these changes Jul 29, 2017
markcowl
markcowl previously approved these changes Jul 30, 2017
@markcowl
Copy link
Member

@cormacpayne cormacpayne merged commit 9ee1941 into Azure:preview Jul 31, 2017
@cormacpayne cormacpayne deleted the common-dependencies branch August 7, 2017 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants