Skip to content

Commit

Permalink
Removed direct DLL references for test projects. Updated the referenc…
Browse files Browse the repository at this point in the history
…es to ProjectReference when necessary. Fixed an issue where Management.Storage 8.1.0-preview was being referenced for tests (when 8.1.1-preview should be).
  • Loading branch information
MiYanni committed Dec 3, 2018
1 parent c897955 commit ccac844
Show file tree
Hide file tree
Showing 56 changed files with 47 additions and 305 deletions.
6 changes: 6 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!-- https://dasmulli.blog/2018/01/20/make-dotnet-test-work-on-solution-files/ -->
<Project>
<Target Name="VSTestIfTestProject">
<CallTarget Targets="VSTest" Condition="'$(IsTestProject)' == 'true'" />
</Target>
</Project>
6 changes: 6 additions & 0 deletions after.Azure.PowerShell.sln.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!-- https://dasmulli.blog/2018/01/20/make-dotnet-test-work-on-solution-files/ -->
<Project>
<Target Name="VSTest">
<MSBuild Projects="@(ProjectReference)" Targets="VSTestIfTestProject" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.Aks">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.Aks\Microsoft.Azure.Commands.Aks.dll</HintPath>
</Reference>
<ProjectReference Include="..\Commands.Aks\Commands.Aks.Netcore.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.AnalysisServices">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.AnalysisServices\Microsoft.Azure.Commands.AnalysisServices.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Commands.AnalysisServices.Dataplane">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.AnalysisServices\Microsoft.Azure.Commands.AnalysisServices.Dataplane.dll</HintPath>
</Reference>
<ProjectReference Include="..\Commands.AnalysisServices.Dataplane\Commands.AnalysisServices.Dataplane.Netcore.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
<PackageReference Include="Microsoft.Azure.Management.ApiManagement" Version="4.0.5-preview" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.ApiManagement">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.ApiManagement\Microsoft.Azure.Commands.ApiManagement.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="SessionRecords\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.Azure.Commands.ApiManagement.Models;
using Microsoft.Azure.Management.ApiManagement.Models;
using Microsoft.Azure.Management.ApiManagement.Models;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
<PackageReference Include="Microsoft.Azure.Management.ApplicationInsights" Version="0.2.0-preview" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.ApplicationInsights">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.ApplicationInsights\Microsoft.Azure.Commands.ApplicationInsights.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="SessionRecords\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@
<PackageReference Include="MSTest.TestAdapter" Version="1.2.1" />
<PackageReference Include="MSTest.TestFramework" Version="1.2.1" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.Automation">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.Automation\Microsoft.Azure.Commands.Automation.dll</HintPath>
</Reference>
<ProjectReference Include="..\Commands.Automation\Commands.Automation.Netcore.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.Batch">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.Batch\Microsoft.Azure.Commands.Batch.dll</HintPath>
</Reference>
<ProjectReference Include="..\Commands.Batch\Commands.Batch.Netcore.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
<PackageReference Include="Microsoft.Azure.Management.Billing" Version="2.1.1-preview" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.Billing">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.Billing\Microsoft.Azure.Commands.Billing.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="SessionRecords\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
<PackageReference Include="Microsoft.Azure.Management.Cdn" Version="4.0.2-preview" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.Cdn">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.Cdn\Microsoft.Azure.Commands.Cdn.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="SessionRecords\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
<PackageReference Include="Microsoft.Azure.Management.CognitiveServices" Version="4.1.1" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.Management.CognitiveServices">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.CognitiveServices\Microsoft.Azure.Commands.Management.CognitiveServices.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="SessionRecords\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="23.2.0" />
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="2.4.2" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.6.1-preview" />
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="8.1.0-preview" />
<PackageReference Include="Moq" Version="4.7.145" />
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="8.1.1-preview" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.Compute">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.Compute\Microsoft.Azure.Commands.Compute.dll</HintPath>
</Reference>
<ProjectReference Include="..\Commands.Compute\Commands.Compute.Netcore.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -67,4 +64,5 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
<PackageReference Include="Microsoft.Azure.Management.Consumption" Version="3.0.2" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.Consumption">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.Consumption\Microsoft.Azure.Commands.Consumption.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="SessionRecords\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
<PackageReference Include="Microsoft.Azure.Management.ContainerInstance" Version="1.0.3-preview" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.ContainerInstance">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.ContainerInstance\Microsoft.Azure.Commands.ContainerInstance.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="SessionRecords\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
<PackageReference Include="Microsoft.Azure.Management.ContainerRegistry" Version="2.0.1" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.ContainerRegistry">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.ContainerRegistry\Microsoft.Azure.Commands.ContainerRegistry.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="SessionRecords\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.DataFactories">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.DataFactories\Microsoft.Azure.Commands.DataFactories.dll</HintPath>
</Reference>
<ProjectReference Include="..\Commands.DataFactories\Commands.DataFactories.Netcore.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@
<PackageReference Include="Microsoft.Azure.Management.DataLake.Store" Version="2.4.2-preview" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.DataLakeAnalytics">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.DataLakeAnalytics\Microsoft.Azure.Commands.DataLakeAnalytics.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="SessionRecords\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.DataLakeStore">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.DataLakeStore\Microsoft.Azure.Commands.DataLakeStore.dll</HintPath>
</Reference>
<ProjectReference Include="..\Commands.DataLakeStore\Commands.DataLakeStore.Netcore.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
<PackageReference Include="Microsoft.Azure.Management.DevSpaces" Version="0.10.0-preview" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.DevSpaces">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.DevSpaces\Microsoft.Azure.Commands.DevSpaces.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="SessionRecords\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Dns" Version="3.0.1" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.6.1-preview" />
<!-- <PackageReference Include="Moq" Version="4.2.1510.2205" /> -->
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.Dns">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.Dns\Microsoft.Azure.Commands.Dns.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@
<PackageReference Include="Microsoft.Azure.Management.EventHub" Version="2.3.0" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.EventGrid">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.EventGrid\Microsoft.Azure.Commands.EventGrid.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Commands.EventHub">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.EventHub\Microsoft.Azure.Commands.EventHub.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="SessionRecords\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
<PackageReference Include="Microsoft.Azure.Management.EventHub" Version="2.3.0" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.EventHub">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.EventHub\Microsoft.Azure.Commands.EventHub.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="SessionRecords\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
<Import Project="$(ProjectDir)..\..\..\..\tools\Common.Netcore.Dependencies.Test.targets" />

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFrameworks>netcoreapp2.1;netcoreapp2.0</TargetFrameworks>
<AssemblyName>Microsoft.Azure.Commands.FrontDoor.Test.ScenarioTests</AssemblyName>
<RootNamespace>Microsoft.Azure.Commands.FrontDoor.Test.ScenarioTests</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.HDInsight">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.HDInsight\Microsoft.Azure.Commands.HDInsight.dll</HintPath>
</Reference>
<ProjectReference Include="..\Commands.HDInsight\Commands.HDInsight.Netcore.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.Insights">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.Insights\Microsoft.Azure.Commands.Insights.dll</HintPath>
</Reference>
<ProjectReference Include="..\Commands.Insights\Commands.Insights.Netcore.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
<PackageReference Include="Microsoft.Azure.Management.IotCentral" Version="2.0.0" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.IotCentral">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.IotCentral\Microsoft.Azure.Commands.IotCentral.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="SessionRecords\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@
<PackageReference Include="Microsoft.Azure.Management.IotHub" Version="2.1.1" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.EventHub">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.EventHub\Microsoft.Azure.Commands.EventHub.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Commands.IotHub">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.IotHub\Microsoft.Azure.Commands.IotHub.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="SessionRecords\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.KeyVault">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.KeyVault\Microsoft.Azure.Commands.KeyVault.dll</HintPath>
</Reference>
<ProjectReference Include="..\Commands.KeyVault\Commands.KeyVault.Netcore.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.LogicApp">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.LogicApp\Microsoft.Azure.Commands.LogicApp.dll</HintPath>
</Reference>
<ProjectReference Include="..\Commands.LogicApp\Commands.LogicApp.Netcore.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
<PackageReference Include="Microsoft.Azure.Management.MachineLearning" Version="1.0.1" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Azure.Commands.MachineLearning">
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.MachineLearning\Microsoft.Azure.Commands.MachineLearning.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="SessionRecords\**\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Loading

0 comments on commit ccac844

Please sign in to comment.