Skip to content

Commit

Permalink
Update most Batch projects to VS17 (#3130)
Browse files Browse the repository at this point in the history
* updating dataplane for batch

* Initial pass at Batch in VS17

* Delete ClientIntegrationTesting folder

  - After the move to VS2017 it's no longer needed.

* Fix static analysis test path

* Temporarily disable Batch Analyzer

* Add release notes reference to Batch packages

* Fix Batch generate.cmd files

* Temporarily ignore some batch projects on official build

  - FileStaging, FileConventions, ConfigureAwaitAnalyzer, OM code generation tools, and the OM integration tests

* Enable WarningAsError on Batch projects
  • Loading branch information
matthchr authored and shahabhijeet committed Apr 28, 2017
1 parent c67fdf6 commit 79dbda2
Show file tree
Hide file tree
Showing 913 changed files with 771 additions and 3,476 deletions.
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<NuGetKey Condition=" '$(NuGetKey)' == '' ">1234</NuGetKey>
<NugetPackageName/>
<ImportDirectoryBuildTargets>true</ImportDirectoryBuildTargets>
<DefaultPathTokenToIgnore>$(IgnorePathTokens) Microsoft.Azure.KeyVault.Samples Gallery Intune Batch\dataPlane Search</DefaultPathTokenToIgnore>
<!--Microsoft.Azure.KeyVault.Samples ClientIntegrationTesting FileConventions FileStaging
<DefaultPathTokenToIgnore>$(IgnorePathTokens) Microsoft.Azure.KeyVault.Samples Gallery Intune FileConventions FileStaging ConfigureAwaitAnalyzer ObjectModelCodeGeneration Azure.Batch.IntegrationTests Azure.Batch.ProtocolTests IntegrationTestCommon Search</DefaultPathTokenToIgnore>
<!--Microsoft.Azure.KeyVault.Samples
ClientRuntime.Azure.TestFramework
Condition=" '$(IgnorePathTokens)' == '' "
ClientRuntime.Azure.TestFramework Microsoft.Azure.Test.HttpRecorder
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<Project Sdk="Microsoft.NET.Sdk">
<!--<Import Project="$([MSBuild]::GetPathOfFileAbove('AzSdk.test.reference.props'))" />-->
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<RestorePackagesPath>$(LibraryNugetPackageFolder)</RestorePackagesPath>
<PackageOutputPath>$(BuiltPackageOutputDir)</PackageOutputPath>
<AddProjectReferenceForDebuggingPurpose>false</AddProjectReferenceForDebuggingPurpose>
<AddNugetReferenceForCIandCmdlineBuild>true</AddNugetReferenceForCIandCmdlineBuild>
<SkipBuildingTestProject>false</SkipBuildingTestProject>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(LibraryToolsFolder)\MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)'=='net452' ">
<DefineConstants>FullNetFx</DefineConstants>
<OutputPath>bin\$(Configuration)\</OutputPath>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<None Remove="TestResources\Data.txt" />
<None Remove="TestResources\localWords.txt" />
</ItemGroup>

<ItemGroup>
<Content Include="TestResources\Data.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestResources\localWords.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<!--<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<DefineConstants>netcoreapp11</DefineConstants>
<OutputPath>bin\$(Configuration)\</OutputPath>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>-->
<ItemGroup>
<PackageReference Include="xunit" Version="2.3.0-beta1-build3642" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-beta1-build1309" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170222-09" />
<PackageReference Include="Microsoft.Azure.Management.Batch" Version="4.2.0" />
<PackageReference Include="WindowsAzure.Storage" Version="8.1.1" />
</ItemGroup>
<ItemGroup>
<!-- This is needed for discovering tests in test explorer -->
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
</ItemGroup>

<PropertyGroup>
<PackageId>Azure.Batch.IntegrationTests</PackageId>
<Description>Azure Batch integration tests</Description>
<VersionPrefix>1.0.0-preview</VersionPrefix>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net452</TargetFrameworks>
</PropertyGroup>

<!--Do not remove until VS Test Tools fixes #472-->
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Azure.Batch\Azure.Batch.csproj" />
<ProjectReference Include="..\TestCommon\Common\Common.csproj" />
<ProjectReference Include="..\TestCommon\IntegrationTestCommon\IntegrationTestCommon.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="System.Windows.Forms" />
<Reference Include="WindowsBase" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<Project Sdk="Microsoft.NET.Sdk">
<!--<Import Project="$([MSBuild]::GetPathOfFileAbove('AzSdk.test.reference.props'))" />-->
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<RestorePackagesPath>$(LibraryNugetPackageFolder)</RestorePackagesPath>
<NugetCommonProfileTags />
<PackageOutputPath>$(BuiltPackageOutputDir)</PackageOutputPath>
<AddProjectReferenceForDebuggingPurpose>false</AddProjectReferenceForDebuggingPurpose>
<AddNugetReferenceForCIandCmdlineBuild>true</AddNugetReferenceForCIandCmdlineBuild>
<SkipBuildingTestProject>false</SkipBuildingTestProject>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(LibraryToolsFolder)\MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)'=='net452' ">
<DefineConstants>FullNetFx</DefineConstants>
<OutputPath>bin\$(Configuration)\</OutputPath>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="xunit" Version="2.3.0-beta1-build3642" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-beta1-build1309" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170222-09" />
<!-- <PackageReference Include="Microsoft.NETCore.App" Version="1.0.2" /> -->
</ItemGroup>
<ItemGroup>
<!-- This is needed for discovering tests in test explorer -->
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
</ItemGroup>

<PropertyGroup>
<PackageId>Azure.Batch.ProtocolTests</PackageId>
<Description>Azure Batch protocol tests</Description>
<VersionPrefix>1.0.0-preview</VersionPrefix>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net452</TargetFrameworks>
</PropertyGroup>

<!--Do not remove until VS Test Tools fixes #472-->
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Azure.Batch\Azure.Batch.csproj" />
<ProjectReference Include="..\TestCommon\Common\Common.csproj" />
<ProjectReference Include="..\TestCommon\IntegrationTestCommon\IntegrationTestCommon.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<Project Sdk="Microsoft.NET.Sdk">
<!--<Import Project="$([MSBuild]::GetPathOfFileAbove('AzSdk.test.reference.props'))" />-->
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<RestorePackagesPath>$(LibraryNugetPackageFolder)</RestorePackagesPath>
<NugetCommonProfileTags/>
<PackageOutputPath>$(BuiltPackageOutputDir)</PackageOutputPath>
<AddProjectReferenceForDebuggingPurpose>false</AddProjectReferenceForDebuggingPurpose>
<AddNugetReferenceForCIandCmdlineBuild>true</AddNugetReferenceForCIandCmdlineBuild>
<SkipBuildingTestProject>false</SkipBuildingTestProject>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(LibraryToolsFolder)\MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)'=='net452' ">
<DefineConstants>FullNetFx</DefineConstants>
<OutputPath>bin\$(Configuration)\</OutputPath>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<DefineConstants>netcoreapp11</DefineConstants>
<OutputPath>bin\$(Configuration)\</OutputPath>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="xunit" Version="2.3.0-beta1-build3642" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-beta1-build1309" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170222-09" />
<!-- <PackageReference Include="Microsoft.NETCore.App" Version="1.0.2" /> -->
</ItemGroup>
<ItemGroup>
<!-- This is needed for discovering tests in test explorer -->
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
</ItemGroup>

<PropertyGroup>
<PackageId>Azure.Batch.Unit.Tests</PackageId>
<Description>Azure Batch Unit tests class library</Description>
<VersionPrefix>1.0.0-preview</VersionPrefix>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>netcoreapp1.1</TargetFrameworks>
</PropertyGroup>

<!--Do not remove until VS Test Tools fixes #472-->
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Azure.Batch\Azure.Batch.csproj" />
<ProjectReference Include="..\TestCommon\Common\Common.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public StaticAnalysisUnitTests(ITestOutputHelper testOutputHelper)
{
this.testOutputHelper = testOutputHelper;

this.sourceLocation = @"..\..\..\src\Azure.Batch";
this.sourceLocation = @"..\..\..\..\Azure.Batch";
this.proxySourceLocation = Path.Combine(this.sourceLocation, GeneratedProtocolFolder);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using System.Threading.Tasks;
using Microsoft.Azure.Batch.FileStaging;
using Models = Microsoft.Azure.Batch.Protocol.Models;
using Microsoft.Rest.Azure;

/// <summary>
/// Manages the AddTasks workflow, performs multiple CloudTaskAdd requests, and handles retries/exception handling.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System.Net.Http;
using System.Threading;

using Microsoft.Azure.Batch.Protocol;

namespace Microsoft.Azure.Batch.Auth
{
using System;
Expand Down
62 changes: 62 additions & 0 deletions src/SDKs/Batch/DataPlane/Azure.Batch/Azure.Batch.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetPathOfFileAbove('AzSdk.reference.props'))" />
<PropertyGroup>
<PackageId>Azure.Batch</PackageId>
<Description>This client library provides access to the Microsoft Azure Batch service.</Description>
<VersionPrefix>6.1.0</VersionPrefix>
<DefineConstants>$(DefineConstants);CODESIGN</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>Microsoft.Azure.Batch</AssemblyName>
<PackageTags>Microsoft;Azure;Batch;windowsazureofficial</PackageTags>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>net452;netstandard1.4</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageReleaseNotes>For detailed release notes, see: https://github.com/Azure/azure-sdk-for-net/blob/vs17Dev/src/SDKs/Batch/DataPlane/changelog.md</PackageReleaseNotes>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)'=='net452' ">
<DefineConstants>$(DefineConstants);FullNetFx</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
<!-- Portable is defined for legacy reasons, if updating AutoRest removes it from BatchErrorException we can remove it here -->
<DefineConstants>$(DefineConstants);netstandard14;PORTABLE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<None Include="App.config" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
<Reference Include="System.Web" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
<!--
Disable this temporarily until we can find a workaround for ReferenceOutputAssembly being broken
<ProjectReference Include="..\..\Tools\ConfigureAwaitAnalyzer\ConfigureAwaitAnalyzer\ConfigureAwaitAnalyzer.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>False</Private>
</ProjectReference>
<Analyzer Include="..\..\Tools\ConfigureAwaitAnalyzer\ConfigureAwaitAnalyzer\bin\Debug\netstandard1.4\ConfigureAwaitAnalyzer.dll" />
-->

</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="1.0.2" />
<!--
Disable this temporarily until we can find a workaround for ReferenceOutputAssembly being broken
<ProjectReference Include="..\..\Tools\ConfigureAwaitAnalyzer\ConfigureAwaitAnalyzer\ConfigureAwaitAnalyzer.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>False</Private>
</ProjectReference>
<Analyzer Include="..\..\Tools\ConfigureAwaitAnalyzer\ConfigureAwaitAnalyzer\bin\Debug\netstandard1.4\ConfigureAwaitAnalyzer.dll" />
-->
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using Protocol.Models;
using BatchError = Batch.BatchError;
Expand Down
Loading

0 comments on commit 79dbda2

Please sign in to comment.