Skip to content

Commit 8533f84

Browse files
committed
Update tests for netstandard build
1 parent 2284165 commit 8533f84

File tree

3 files changed

+32
-67
lines changed

3 files changed

+32
-67
lines changed

src/Az.Test.props

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<!-- Build -->
1313
<PropertyGroup>
14-
<TargetFrameworks>netcoreapp2.1;netcoreapp2.0</TargetFrameworks>
14+
<TargetFrameworks>netcoreapp2.1;netcoreapp2.0;netstandard2.0</TargetFrameworks>
1515
<AssemblyName>$(AzAssemblyPrefix)$(PsModuleName)$(AzTestAssemblySuffix)</AssemblyName>
1616
<RootNamespace>$(AzAssemblyPrefix)$(PsModuleName)$(AzTestAssemblySuffix)</RootNamespace>
1717
<IsPackable>false</IsPackable>
@@ -25,6 +25,10 @@
2525
<DefineConstants>TRACE;RELEASE;NETSTANDARD</DefineConstants>
2626
</PropertyGroup>
2727

28+
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
29+
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
30+
</PropertyGroup>
31+
2832
<ItemGroup Condition="'$(IncludeCommonTestProject)' != 'false'">
2933
<ProjectReference Include="$(RepoTools)ScenarioTest.ResourceManager\ScenarioTest.ResourceManager.csproj" />
3034
<ProjectReference Include="$(RepoTools)TestFx\TestFx.csproj" />

tools/Common.Netcore.Dependencies.Test.targets

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,28 @@
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<OmitJsonPackage>true</OmitJsonPackage>
5+
<IsTestProject>true</IsTestProject>
56
</PropertyGroup>
67
<Import Project="$(MSBuildThisFileDirectory)\Common.Netcore.Dependencies.targets" />
78

8-
<ItemGroup Condition="'$(TargetFramework)' != 'net472'">
9-
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" Version="1.9.1-preview" >
10-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
11-
</PackageReference>
12-
<PackageReference Include="Microsoft.Azure.Test.HttpRecorder" Version="1.13.2" >
13-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
14-
</PackageReference>
15-
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication" Version="2.3.7" >
16-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
17-
</PackageReference>
18-
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework" Version="1.7.6" >
19-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
20-
</PackageReference>
9+
<ItemGroup>
10+
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" Version="1.9.1-preview" />
11+
<PackageReference Include="Microsoft.Azure.Test.HttpRecorder" Version="1.13.2" />
12+
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication" Version="2.3.7" />
13+
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework" Version="1.7.6" />
2114
<PackageReference Include="xunit" Version="2.4.0" />
2215
</ItemGroup>
2316

24-
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
25-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
17+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
2618
<PackageReference Include="xunit.runner.console" Version="2.4.0" />
27-
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.0.0" />
19+
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" />
2820
<Reference Include="System.Net.Http" />
2921
<Reference Include="System.Management.Automation">
3022
<SpecificVersion>False</SpecificVersion>
3123
<HintPath>$(windir)\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll</HintPath>
3224
</Reference>
3325
<PackageReference Include="Newtonsoft.Json" version="10.0.3" />
26+
<PackageReference Include="Microsoft.Extensions.Primitives" Version="1.0.1" />
3427
</ItemGroup>
3528

3629
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
Lines changed: 18 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,23 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<ItemGroup Condition="'$(TargetFramework)' != 'net472'">
4-
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.19">
5-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
6-
</PackageReference>
7-
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="3.3.19">
8-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
9-
</PackageReference>
10-
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.Aks" Version="1.1.15-preview">
11-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
12-
</PackageReference>
13-
<PackageReference Include="Microsoft.Azure.PowerShell.Authentication.Abstractions" Version="1.1.15-preview">
14-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
15-
</PackageReference>
16-
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.Authorization" Version="1.1.15-preview">
17-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
18-
</PackageReference>
19-
<PackageReference Include="Microsoft.Azure.PowerShell.Common" Version="1.1.15-preview">
20-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
21-
</PackageReference>
22-
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.Compute" Version="1.1.15-preview">
23-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
24-
</PackageReference>
25-
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.Graph.Rbac" Version="1.1.15-preview">
26-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
27-
</PackageReference>
28-
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.KeyVault" Version="1.1.15-preview">
29-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
30-
</PackageReference>
31-
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.Network" Version="1.1.15-preview">
32-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
33-
</PackageReference>
34-
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.ResourceManager" Version="1.1.15-preview">
35-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
36-
</PackageReference>
37-
<PackageReference Include="Microsoft.Azure.PowerShell.Storage" Version="1.1.15-preview">
38-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
39-
</PackageReference>
40-
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.Storage.Management" Version="1.1.15-preview">
41-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
42-
</PackageReference>
43-
<PackageReference Include="Microsoft.Azure.PowerShell.Strategies" Version="1.1.15-preview">
44-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
45-
</PackageReference>
46-
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.Websites" Version="1.1.15-preview">
47-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
48-
</PackageReference>
3+
<ItemGroup >
4+
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.19"/>
5+
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="3.3.19"/>
6+
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.Aks" Version="1.1.15-preview"/>
7+
<PackageReference Include="Microsoft.Azure.PowerShell.Authentication.Abstractions" Version="1.1.15-preview"/>
8+
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.Authorization" Version="1.1.15-preview"/>
9+
<PackageReference Include="Microsoft.Azure.PowerShell.Common" Version="1.1.15-preview"/>
10+
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.Compute" Version="1.1.15-preview"/>
11+
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.Graph.Rbac" Version="1.1.15-preview"/>
12+
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.KeyVault" Version="1.1.15-preview"/>
13+
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.Network" Version="1.1.15-preview"/>
14+
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.ResourceManager" Version="1.1.15-preview"/>
15+
<PackageReference Include="Microsoft.Azure.PowerShell.Storage" Version="1.1.15-preview"/>
16+
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.Storage.Management" Version="1.1.15-preview"/>
17+
<PackageReference Include="Microsoft.Azure.PowerShell.Strategies" Version="1.1.15-preview"/>
18+
<PackageReference Include="Microsoft.Azure.PowerShell.Clients.Websites" Version="1.1.15-preview"/>
4919
</ItemGroup>
50-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
20+
<ItemGroup Condition="'$(IsTestProject)' != 'true'">
5121
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.4.0">
5222
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
5323
</PackageReference>
@@ -63,8 +33,6 @@
6333
<StorageToolsPath>$(NugetPackageRoot)microsoft.azure.powershell.storage\1.1.15-preview\tools\</StorageToolsPath>
6434
</PropertyGroup>
6535
<ItemGroup Condition="'$(OmitJsonPackage)' != 'true'">
66-
<PackageReference Include="Newtonsoft.Json" Version="10.0.3">
67-
<PrivateAssets Condition="'$(HideReferenceDependencies)' == 'true'">All</PrivateAssets>
68-
</PackageReference>
36+
<PackageReference Include="Newtonsoft.Json" Version="10.0.3"/>
6937
</ItemGroup>
7038
</Project>

0 commit comments

Comments
 (0)