Skip to content

Commit 7087f15

Browse files
authored
Nug tools (Azure#6499)
* initial set of changes for using nuget * more settings updates. Removing irrelevant properties * adding skip test for all test projects that were skipped earlier. removing irrelevant props, targets. Removed implicit executing init as default targets * making init target not to download legacy toolset * mac testing updates * fixing keyvault projects to remove unnecessary imports * fixing indentation for yml files * updating nuget package for new directory structure * disabling failing tests * adding missing files
1 parent 8ecf475 commit 7087f15

File tree

54 files changed

+257
-130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+257
-130
lines changed

.azure-pipelines/mgmt.yml

+33-8
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,20 @@ jobs:
2121
LoggingArgs: '/flp:Summary;Verbosity=minimal;LogFile=msbuild.sum /flp1:warningsonly;logfile=msbuild.wrn /flp2:errorsonly;logfile=msbuild.err'
2222

2323
steps:
24-
- task: CmdLine@1
25-
inputs:
26-
filename: C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\sn.exe
27-
arguments: -Vr *,31bf3856ad364e35
28-
displayName: 'Disable strong name verification'
24+
# - task: CmdLine@1
25+
# inputs:
26+
# filename: C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\sn.exe
27+
# arguments: -Vr *,31bf3856ad364e35
28+
# displayName: 'Disable strong name verification'
29+
2930
- task: MSBuild@1
3031
inputs:
3132
solution: build.proj
3233
displayName: 'Install build tools'
3334
- task: MSBuild@1
3435
inputs:
3536
solution: build.proj
36-
msbuildArguments: /t:RunTests /clp:ShowTimestamp $(LoggingArgs) /p:IgnorePathTokens="$(IgnoreBuildTokens)"
37+
msbuildArguments: /t:RunTests /clp:ShowTimestamp $(LoggingArgs) /p:IgnorePathTokens="$(IgnoreBuildTokens)" /p:UseLegacyDirStructure=true /p:SkipTests=true
3738
displayName: 'Build and Run tests'
3839
- task: PublishTestResults@2
3940
condition: succeededOrFailed()
@@ -52,12 +53,36 @@ jobs:
5253
displayName: 'Use .NET Core sdk $(DotNetCoreVersion)'
5354
inputs:
5455
version: '$(DotNetCoreVersion)'
55-
- script: './tools/linuxScripts/runNetCoreSdkTests.sh'
56-
displayName: 'Build and test on Non-windows machine'
56+
57+
- task: DotNetCoreCLI@1
58+
inputs:
59+
command: msbuild
60+
solution: build.proj
61+
arguments: /t:RunTests /clp:ShowTimestamp $(LoggingArgs) /p:IgnorePathTokens="$(IgnoreBuildTokens)" /p:UseLegacyDirStructure=true /p:SkipTests=true
62+
displayName: 'Ubuntu Build and Run tests'
5763
- task: PublishTestResults@2
5864
condition: succeededOrFailed()
5965
inputs:
6066
testResultsFiles: '**/*.trx'
6167
testRunTitle: 'Ubuntu Test Results'
6268
testResultsFormat: 'VSTest'
6369
mergeTestResults: true
70+
71+
# - job: Ubuntu_Build
72+
# pool:
73+
# vmImage: 'ubuntu-16.04'
74+
75+
# steps:
76+
# - task: DotNetCoreInstaller@0
77+
# displayName: 'Use .NET Core sdk $(DotNetCoreVersion)'
78+
# inputs:
79+
# version: '$(DotNetCoreVersion)'
80+
# - script: './tools/linuxScripts/runNetCoreSdkTests.sh'
81+
# displayName: 'Build and test on Non-windows machine'
82+
# - task: PublishTestResults@2
83+
# condition: succeededOrFailed()
84+
# inputs:
85+
# testResultsFiles: '**/*.trx'
86+
# testRunTitle: 'Ubuntu Test Results'
87+
# testResultsFormat: 'VSTest'
88+
# mergeTestResults: true

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ tools/Microsoft.WindowsAzure.Build.Tasks/packages/
2222
PublishedNugets/
2323
src/NuGet.Config
2424
tools/7-zip/
25+
#tools/LocalNugetFeed/Microsoft.Internal.NetSdkBuild.Mgmt.Tools.*.nupkg
2526

2627
[Tt]est[Rr]esult
2728
[Bb]uild[Ll]og.*

AzSdk.props

-3
This file was deleted.

Directory.Build.props

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
<PropertyGroup>
33
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
44
<RepoEngPath>$(MSBuildThisFileDirectory)eng</RepoEngPath>
5-
<RepoSrcPath>$(RepoRoot)src/SDKs</RepoSrcPath>
5+
<RepoSrcPath>$(RepoRoot)src</RepoSrcPath>
6+
<RepoSdkPath>$(RepoRoot)src/SDKs</RepoSdkPath>
67
<IsClientLibrary Condition="'$(IsClientLibrary)' == '' and $(MSBuildProjectName.StartsWith('Azure.'))">true</IsClientLibrary>
78
<IsDataPlaneProject Condition="'$(IsDataPlaneProject)' == '' and '$(IsClientLibrary)' == 'true'">true</IsDataPlaneProject>
89
<IsDataPlaneProject Condition="'$(IsDataPlaneProject)' == '' and $(MSBuildProjectDirectory.Contains('data-plane'))">true</IsDataPlaneProject>
910
</PropertyGroup>
1011

11-
<Import Project="$(RepoEngPath)\Directory.Build.Mgmt.props" Condition="'$(IsDataPlaneProject)' != 'true'" />
12+
<Import Project="$(RepoEngPath)\mgmt\Directory.Build.Mgmt.props" Condition="'$(IsDataPlaneProject)' != 'true'" />
1213
<Import Project="$(RepoEngPath)\Directory.Build.Data.props" Condition="'$(IsDataPlaneProject)' == 'true'" />
1314
</Project>

Directory.Build.targets

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2-
<Import Project="$(RepoEngPath)\Directory.Build.Mgmt.targets" Condition="'$(IsDataPlaneProject)' != 'true'" />
2+
<Import Project="$(RepoEngPath)\mgmt\Directory.Build.Mgmt.targets" Condition="'$(IsDataPlaneProject)' != 'true'" />
33
<Import Project="$(RepoEngPath)\Directory.Build.Data.targets" Condition="'$(IsDataPlaneProject)' == 'true'" />
44
</Project>

NuGet.Config

+13-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,16 @@
66
<add key="roslyn" value="https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json" />
77
<add key="azure-sdk-tools" value="https://azuresdkartifacts.blob.core.windows.net/azure-sdk-tools/index.json" />
88
</packageSources>
9-
</configuration>
9+
<config>
10+
<add key="globalPackagesFolder" value="restoredPackages" />
11+
<add key="RestorePackagesPath" value="restoredPackages" />
12+
</config>
13+
14+
<packageRestore>
15+
<!-- Allow NuGet to download missing packages -->
16+
<add key="enabled" value="True" />
17+
18+
<!-- Automatically check for missing packages during build in Visual Studio -->
19+
<add key="automatic" value="True" />
20+
</packageRestore>
21+
</configuration>

build.proj

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<Project DefaultTargets="Init" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<Import Project="Directory.Build.props" />
3-
<Import Project="test.props" />
4-
<Import Project="AzSdk.props" />
53
<Import Project="Directory.Build.targets" />
6-
<Import Project="$(NetSdkBuildTargetsDir)\core\_build.proj" Condition=" Exists('$(NetSdkBuildTargetsDir)\core\_build.proj') "/>
74
</Project>

eng/AzSdk.reference.targets

-17
This file was deleted.

eng/AzSdk.test.reference.targets

-15
This file was deleted.

eng/Directory.Build.Mgmt.props

-33
This file was deleted.

eng/Directory.Build.Mgmt.targets

-4
This file was deleted.

eng/mgmt/AzSdk.reference.props

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<PropertyGroup>
3+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="[3.3.19, 4.0.0)" />
7+
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="[2.3.19, 3.0.0)" />
8+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.1" PrivateAssets="All" />
9+
</ItemGroup>
10+
11+
<PropertyGroup>
12+
<SdkTargetFx>net452;net461;netstandard1.4;netstandard2.0</SdkTargetFx>
13+
</PropertyGroup>
14+
15+
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
16+
<PackageReference Include="System.Net.Http" Version="4.3.0"/>
17+
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
18+
</ItemGroup>
19+
20+
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
21+
<PackageReference Include="System.Net.Http" Version="4.3.0"/>
22+
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
23+
</ItemGroup>
24+
25+
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
26+
<PackageReference Include="System.Net.Http" Version="4.3.0"/>
27+
<PackageReference Include="Newtonsoft.Json" Version="6.0.8" />
28+
</ItemGroup>
29+
30+
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
31+
<Reference Include="System.Net" />
32+
<Reference Include="System.Net.Http" />
33+
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
34+
</ItemGroup>
35+
<PropertyGroup>
36+
<EnablePreBuildTarget Condition=" '$(EnablePreBuildTarget)' == '' ">true</EnablePreBuildTarget>
37+
<EnablePostBuildTarget Condition=" '$(EnablePostBuildTarget)' == '' ">true</EnablePostBuildTarget>
38+
</PropertyGroup>
39+
40+
</Project>

eng/mgmt/AzSdk.test.reference.props

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<PropertyGroup>
3+
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<PackageReference Include="Microsoft.Azure.Test.HttpRecorder" Version="[1.13.3, 2.0.0)" />
7+
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework" Version="[1.7.6, 2.0.0)" />
8+
<PackageReference Include="Microsoft.Azure.ResourceManager" Version="[1.1.0-preview]" />
9+
<PackageReference Include="xunit" Version="2.3.1" />
10+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
11+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
12+
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
13+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.1" PrivateAssets="All" />
14+
</ItemGroup>
15+
</Project>

eng/mgmt/Directory.Build.Mgmt.props

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Import Project="$(RepoRoot)\tools\bootstrapTools\bootstrap.targets" />
3+
<Import Project="CI.Bootstrap.targets" Sdk="Microsoft.Internal.NetSdkBuild.Mgmt.Tools" Version="0.10.0" />
4+
</Project>

eng/mgmt/Directory.Build.Mgmt.targets

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<!-- <Import Project="$(NetSdkBuildTargetsDir)\core\_Directory.Build.targets" Condition=" Exists('$(NetSdkBuildTargetsDir)\core\_Directory.Build.targets') "/>
3+
<Import Project="$(LibraryToolsFolder)\bootstrapTools\bootstrap.targets" /> -->
4+
5+
<Target Name="initt">
6+
<Message Text="Init target called" />
7+
</Target>
8+
</Project>

sdk/keyvault/Microsoft.Azure.KeyVault.WebKey/src/Microsoft.Azure.KeyVault.WebKey.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="$([MSBuild]::GetPathOfFileAbove('AzSdk.props'))" />
32
<PropertyGroup>
43
<Description>Microsoft Azure Key Vault WebKey Class Library</Description>
54
<AssemblyTitle>Microsoft Azure Key Vault WebKey</AssemblyTitle>

src/AzSdk.reference.props

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2-
<Import Project="$([MSBuild]::GetPathOfFileAbove('AzSdk.props'))" />
2+
<PropertyGroup>
3+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
4+
</PropertyGroup>
35
<ItemGroup>
46
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="[3.3.19, 4.0.0)" />
57
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="[2.3.19, 3.0.0)" />
8+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.1" PrivateAssets="All" />
69
</ItemGroup>
710

811
<PropertyGroup>
@@ -33,4 +36,5 @@
3336
<EnablePreBuildTarget Condition=" '$(EnablePreBuildTarget)' == '' ">true</EnablePreBuildTarget>
3437
<EnablePostBuildTarget Condition=" '$(EnablePostBuildTarget)' == '' ">true</EnablePostBuildTarget>
3538
</PropertyGroup>
39+
3640
</Project>

src/AzSdk.test.reference.props

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2-
<Import Project="$([MSBuild]::GetPathOfFileAbove('test.props'))" />
3-
1+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
42
<PropertyGroup>
53
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
64
</PropertyGroup>
75
<ItemGroup>
86
<PackageReference Include="Microsoft.Azure.Test.HttpRecorder" Version="[1.13.3, 2.0.0)" />
97
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework" Version="[1.7.6, 2.0.0)" />
108
<PackageReference Include="Microsoft.Azure.ResourceManager" Version="[1.1.0-preview]" />
11-
12-
<!-- This is needed for discovering tests in test explorer -->
13-
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
9+
<PackageReference Include="xunit" Version="2.3.1" />
10+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
11+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
12+
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
13+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.1" PrivateAssets="All" />
1414
</ItemGroup>
1515
</Project>

src/AzureStack/Admin/FabricAdmin/Fabric.Admin.Tests/Fabric.Tests.csproj

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
<Version>1.0.0</Version>
99
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1010
</PropertyGroup>
11-
11+
<PropertyGroup>
12+
<ExcludeFromBuild>true</ExcludeFromBuild>
13+
<ExcludeFromTest>true</ExcludeFromTest>
14+
</PropertyGroup>
1215
<ItemGroup>
1316
<ProjectReference Include="..\Fabric.Admin\Microsoft.AzureStack.Management.Fabric.Admin.csproj" />
1417
</ItemGroup>

src/SDKs/ApplicationInsights/Management/ApplicationInsights.Tests/ApplicationInsights.Tests.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
<VersionPrefix>1.0.0-preview</VersionPrefix>
88
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
99
</PropertyGroup>
10+
<PropertyGroup>
11+
<ExcludeFromBuild>true</ExcludeFromBuild>
12+
<ExcludeFromTest>true</ExcludeFromTest>
13+
</PropertyGroup>
1014
<ItemGroup>
1115
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" Version="[1.6.0-preview, 2.0.0)" />
1216
<!-- Enable below line in local to work around the bug that cannot find test cases -->

src/SDKs/Batch/Management/Management.Batch.Tests/Management.Batch.Tests.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
<Copyright>Copyright © MSIT 2013</Copyright>
1515
<SignAssembly>false</SignAssembly>
1616
</PropertyGroup>
17+
<PropertyGroup>
18+
<ExcludeFromBuild>true</ExcludeFromBuild>
19+
<ExcludeFromTest>true</ExcludeFromTest>
20+
</PropertyGroup>
1721
<ItemGroup>
1822
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" Version="[1.6.0-preview,2.0.0)" />
1923
<ProjectReference Include="..\Management.Batch\Microsoft.Azure.Management.Batch.csproj" />

src/SDKs/Billing/Billing.Tests/Billing.Tests.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
<Version>1.0.0</Version>
99
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1010
</PropertyGroup>
11+
<PropertyGroup>
12+
<ExcludeFromBuild>true</ExcludeFromBuild>
13+
<ExcludeFromTest>true</ExcludeFromTest>
14+
</PropertyGroup>
1115
<ItemGroup>
1216
<ProjectReference Include="..\Management.Billing\Microsoft.Azure.Management.Billing.csproj" />
1317
</ItemGroup>

src/SDKs/Compute/Compute.Tests/Compute.Tests.csproj

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
<AssemblyName>Compute.Tests</AssemblyName>
77
<VersionPrefix>1.0.0-preview</VersionPrefix>
88
</PropertyGroup>
9-
9+
<PropertyGroup>
10+
<ExcludeFromBuild>true</ExcludeFromBuild>
11+
<ExcludeFromTest>true</ExcludeFromTest>
12+
</PropertyGroup>
1013
<ItemGroup>
1114
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="4.2.0-preview" />
1215
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.3.0-preview" />

src/SDKs/Consumption/Consumption.Tests/Consumption.Tests.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
<Version>1.0.0</Version>
88
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
99
</PropertyGroup>
10+
<PropertyGroup>
11+
<ExcludeFromBuild>true</ExcludeFromBuild>
12+
<ExcludeFromTest>true</ExcludeFromTest>
13+
</PropertyGroup>
1014

1115
<ItemGroup>
1216
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" Version="1.6.0-preview" />

0 commit comments

Comments
 (0)